home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / What's New? / Development Kits / Mac OS / USB DDK 1.4.6f4 / Interfaces / HID.h next >
Encoding:
C/C++ Source or Header  |  2000-09-26  |  87.2 KB  |  1,952 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:       HID.h
  3.  
  4.      Contains:   Definition of the interfaces to the HIDLib shared library and
  5.  
  6.      Version:    HID 1.0
  7.  
  8. */
  9. #ifndef __HID__
  10. #define __HID__
  11.  
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15.  
  16. #ifndef __MACERRORS__
  17. #include <MacErrors.h>
  18. #endif
  19.  
  20.  
  21.  
  22.  
  23. #if PRAGMA_ONCE
  24. #pragma once
  25. #endif
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34.  
  35. #if PRAGMA_STRUCT_ALIGN
  36.     #pragma options align=mac68k
  37. #elif PRAGMA_STRUCT_PACKPUSH
  38.     #pragma pack(push, 2)
  39. #elif PRAGMA_STRUCT_PACK
  40.     #pragma pack(2)
  41. #endif
  42.  
  43. /*
  44.    
  45.     Interfaces for HIDLib
  46. */
  47.  
  48. /* types of HID reports (input, output, feature)*/
  49. enum {
  50.   kHIDInputReport               = 1,
  51.   kHIDOutputReport              = 2,
  52.   kHIDFeatureReport             = 3,
  53.   kHIDUnknownReport             = 255
  54. };
  55.  
  56. /* constants used in HIDButtonCapabilities and HIDValueCapabilities structures*/
  57. enum {
  58.                                         /* While HIDButtonCaps and HIDValueCaps have no version #, they can be*/
  59.                                         /* thought of as version 1 of HIDButtonCapabilities and HIDValueCapabilities.*/
  60.   kHIDCurrentCapabilitiesPBVersion = 2
  61. };
  62.  
  63. /* flags passed to HIDOpenReportDescriptor*/
  64. enum {
  65.   kHIDFlag_StrictErrorChecking  = 0x00000001
  66. };
  67.  
  68. typedef UInt32                          HIDReportType;
  69. typedef UInt32                          HIDUsage;
  70. typedef struct OpaqueHIDPreparsedDataRef*  HIDPreparsedDataRef;
  71.  
  72. struct HIDUsageAndPage {
  73.   HIDUsage            usage;
  74.   HIDUsage            usagePage;
  75. };
  76. typedef struct HIDUsageAndPage          HIDUsageAndPage;
  77. typedef HIDUsageAndPage *               HIDUsageAndPagePtr;
  78.  
  79. struct HIDCaps {
  80.   HIDUsage            usage;
  81.   HIDUsage            usagePage;
  82.   ByteCount           inputReportByteLength;
  83.   ByteCount           outputReportByteLength;
  84.   ByteCount           featureReportByteLength;
  85.   UInt32              numberCollectionNodes;
  86.   UInt32              numberInputButtonCaps;
  87.   UInt32              numberInputValueCaps;
  88.   UInt32              numberOutputButtonCaps;
  89.   UInt32              numberOutputValueCaps;
  90.   UInt32              numberFeatureButtonCaps;
  91.   UInt32              numberFeatureValueCaps;
  92. };
  93. typedef struct HIDCaps                  HIDCaps;
  94. typedef HIDCaps *                       HIDCapsPtr;
  95.  
  96. struct HIDCapabilities {
  97.   HIDUsage            usage;
  98.   HIDUsage            usagePage;
  99.   ByteCount           inputReportByteLength;
  100.   ByteCount           outputReportByteLength;
  101.   ByteCount           featureReportByteLength;
  102.   UInt32              numberCollectionNodes;
  103.   UInt32              numberInputButtonCaps;
  104.   UInt32              numberInputValueCaps;
  105.   UInt32              numberOutputButtonCaps;
  106.   UInt32              numberOutputValueCaps;
  107.   UInt32              numberFeatureButtonCaps;
  108.   UInt32              numberFeatureValueCaps;
  109. };
  110. typedef struct HIDCapabilities          HIDCapabilities;
  111. typedef HIDCapabilities *               HIDCapabilitiesPtr;
  112.  
  113. struct HIDCollectionNode {
  114.   HIDUsage            collectionUsage;
  115.   HIDUsage            collectionUsagePage;
  116.   UInt32              parent;
  117.   UInt32              numberOfChildren;
  118.   UInt32              nextSibling;
  119.   UInt32              firstChild;
  120. };
  121. typedef struct HIDCollectionNode        HIDCollectionNode;
  122. typedef HIDCollectionNode *             HIDCollectionNodePtr;
  123.  
  124. struct HIDButtonCaps {
  125.   HIDUsage            usagePage;
  126.   UInt32              reportID;
  127.   UInt32              bitField;
  128.   UInt32              collection;
  129.   HIDUsage            collectionUsage;
  130.   HIDUsage            collectionUsagePage;
  131.   Boolean             isRange;
  132.   Boolean             isStringRange;
  133.   Boolean             isDesignatorRange;
  134.   Boolean             isAbsolute;
  135.  
  136.   union {
  137.     struct {
  138.       HIDUsage            usageMin;
  139.       HIDUsage            usageMax;
  140.       UInt32              stringMin;
  141.       UInt32              stringMax;
  142.       UInt32              designatorMin;
  143.       UInt32              designatorMax;
  144.     }                       range;
  145.     struct {
  146.       HIDUsage            usage;
  147.       HIDUsage            reserved1;
  148.       UInt32              stringIndex;
  149.       UInt32              reserved2;
  150.       UInt32              designatorIndex;
  151.       UInt32              reserved3;
  152.     }                       notRange;
  153.   }                       u;
  154. };
  155. typedef struct HIDButtonCaps            HIDButtonCaps;
  156. typedef HIDButtonCaps *                 HIDButtonCapsPtr;
  157.  
  158. struct HIDButtonCapabilities {
  159.   HIDUsage            usagePage;
  160.   UInt32              reportID;
  161.   UInt32              bitField;
  162.   UInt32              collection;
  163.   HIDUsage            collectionUsage;
  164.   HIDUsage            collectionUsagePage;
  165.  
  166.   Boolean             isRange;
  167.   Boolean             isStringRange;
  168.   Boolean             isDesignatorRange;
  169.   Boolean             isAbsolute;
  170.  
  171.   SInt32              unitExponent;
  172.   SInt32              units;
  173.   UInt32              reserved;
  174.   UInt32              pbVersion;
  175.  
  176.   union {
  177.     struct {
  178.       HIDUsage            usageMin;
  179.       HIDUsage            usageMax;
  180.       UInt32              stringMin;
  181.       UInt32              stringMax;
  182.       UInt32              designatorMin;
  183.       UInt32              designatorMax;
  184.     }                       range;
  185.     struct {
  186.       HIDUsage            usage;
  187.       HIDUsage            reserved1;
  188.       UInt32              stringIndex;
  189.       UInt32              reserved2;
  190.       UInt32              designatorIndex;
  191.       UInt32              reserved3;
  192.     }                       notRange;
  193.   }                       u;
  194. };
  195. typedef struct HIDButtonCapabilities    HIDButtonCapabilities;
  196. typedef HIDButtonCapabilities *         HIDButtonCapabilitiesPtr;
  197.  
  198. struct HIDValueCaps {
  199.   HIDUsage            usagePage;
  200.   UInt32              reportID;
  201.   UInt32              bitField;
  202.   UInt32              collection;
  203.   HIDUsage            collectionUsage;
  204.   HIDUsage            collectionUsagePage;
  205.  
  206.   Boolean             isRange;
  207.   Boolean             isStringRange;
  208.   Boolean             isDesignatorRange;
  209.   Boolean             isAbsolute;
  210.  
  211.   UInt32              bitSize;
  212.   UInt32              reportCount;
  213.  
  214.   SInt32              logicalMin;
  215.   SInt32              logicalMax;
  216.   SInt32              physicalMin;
  217.   SInt32              physicalMax;
  218.  
  219.   union {
  220.     struct {
  221.       HIDUsage            usageMin;
  222.       HIDUsage            usageMax;
  223.       UInt32              stringMin;
  224.       UInt32              stringMax;
  225.       UInt32              designatorMin;
  226.       UInt32              designatorMax;
  227.     }                       range;
  228.     struct {
  229.       HIDUsage            usage;
  230.       HIDUsage            reserved1;
  231.       UInt32              stringIndex;
  232.       UInt32              reserved2;
  233.       UInt32              designatorIndex;
  234.       UInt32              reserved3;
  235.     }                       notRange;
  236.   }                       u;
  237. };
  238. typedef struct HIDValueCaps             HIDValueCaps;
  239. typedef HIDValueCaps *                  HIDValueCapsPtr;
  240.  
  241. struct HIDValueCapabilities {
  242.   HIDUsage            usagePage;
  243.   UInt32              reportID;
  244.   UInt32              bitField;
  245.   UInt32              collection;
  246.   HIDUsage            collectionUsage;
  247.   HIDUsage            collectionUsagePage;
  248.  
  249.   Boolean             isRange;
  250.   Boolean             isStringRange;
  251.   Boolean             isDesignatorRange;
  252.   Boolean             isAbsolute;
  253.  
  254.   UInt32              bitSize;
  255.   UInt32              reportCount;
  256.  
  257.   SInt32              logicalMin;
  258.   SInt32              logicalMax;
  259.   SInt32              physicalMin;
  260.   SInt32              physicalMax;
  261.  
  262.   SInt32              unitExponent;
  263.   SInt32              units;
  264.   UInt32              reserved;
  265.   UInt32              pbVersion;
  266.  
  267.   union {
  268.     struct {
  269.       HIDUsage            usageMin;
  270.       HIDUsage            usageMax;
  271.       UInt32              stringMin;
  272.       UInt32              stringMax;
  273.       UInt32              designatorMin;
  274.       UInt32              designatorMax;
  275.     }                       range;
  276.     struct {
  277.       HIDUsage            usage;
  278.       HIDUsage            reserved1;
  279.       UInt32              stringIndex;
  280.       UInt32              reserved2;
  281.       UInt32              designatorIndex;
  282.       UInt32              reserved3;
  283.     }                       notRange;
  284.   }                       u;
  285. };
  286. typedef struct HIDValueCapabilities     HIDValueCapabilities;
  287. typedef HIDValueCapabilities *          HIDValueCapabilitiesPtr;
  288. #if CALL_NOT_IN_CARBON
  289. /*
  290.  *  HIDGetHIDLibVersion()
  291.  *  
  292.  *  Availability:
  293.  *    Non-Carbon CFM:   available in HIDLib 1.4.3 or later
  294.  *    CarbonLib:        not available
  295.  *    Mac OS X:         not available
  296.  */
  297. EXTERN_API_C( UInt32 )
  298. HIDGetHIDLibVersion( void );
  299.  
  300.  
  301. /*
  302.  *  HIDOpenReportDescriptor()
  303.  *  
  304.  *  Availability:
  305.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  306.  *    CarbonLib:        not available
  307.  *    Mac OS X:         not available
  308.  */
  309. EXTERN_API_C( OSStatus )
  310. HIDOpenReportDescriptor( 
  311.   void *                  hidReportDescriptor,
  312.   ByteCount               descriptorLength,
  313.   HIDPreparsedDataRef *   preparsedDataRef,
  314.   UInt32                  flags);
  315.  
  316.  
  317. /*
  318.  *  HIDCloseReportDescriptor()
  319.  *  
  320.  *  Availability:
  321.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  322.  *    CarbonLib:        not available
  323.  *    Mac OS X:         not available
  324.  */
  325. EXTERN_API_C( OSStatus )
  326. HIDCloseReportDescriptor( 
  327.   HIDPreparsedDataRef     preparsedDataRef);
  328.  
  329.  
  330.  
  331. /*
  332.  *  HIDGetCaps()
  333.  *  
  334.  *  Availability:
  335.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  336.  *    CarbonLib:        not available
  337.  *    Mac OS X:         not available
  338.  */
  339. EXTERN_API_C( OSStatus )
  340. HIDGetCaps( 
  341.   HIDPreparsedDataRef     preparsedDataRef,
  342.   HIDCapsPtr              capabilities);
  343.  
  344.  
  345. /*
  346.  *  HIDGetCapabilities()
  347.  *  
  348.  *  Availability:
  349.  *    Non-Carbon CFM:   available in HIDLib 1.4.3 or later
  350.  *    CarbonLib:        not available
  351.  *    Mac OS X:         not available
  352.  */
  353. EXTERN_API_C( OSStatus )
  354. HIDGetCapabilities( 
  355.   HIDPreparsedDataRef     preparsedDataRef,
  356.   HIDCapabilitiesPtr      capabilities);
  357.  
  358.  
  359. /*
  360.  *  HIDGetCollectionNodes()
  361.  *  
  362.  *  Availability:
  363.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  364.  *    CarbonLib:        not available
  365.  *    Mac OS X:         not available
  366.  */
  367. EXTERN_API_C( OSStatus )
  368. HIDGetCollectionNodes( 
  369.   HIDCollectionNodePtr    collectionNodes,
  370.   UInt32 *                collectionNodesSize,
  371.   HIDPreparsedDataRef     preparsedDataRef);
  372.  
  373.  
  374. /*
  375.  *  HIDGetButtonCaps()
  376.  *  
  377.  *  Availability:
  378.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  379.  *    CarbonLib:        not available
  380.  *    Mac OS X:         not available
  381.  */
  382. EXTERN_API_C( OSStatus )
  383. HIDGetButtonCaps( 
  384.   HIDReportType           reportType,
  385.   HIDButtonCapsPtr        buttonCaps,
  386.   UInt32 *                buttonCapsSize,
  387.   HIDPreparsedDataRef     preparsedDataRef);
  388.  
  389.  
  390. /*
  391.  *  HIDGetButtonCapabilities()
  392.  *  
  393.  *  Availability:
  394.  *    Non-Carbon CFM:   available in HIDLib 1.4.3 or later
  395.  *    CarbonLib:        not available
  396.  *    Mac OS X:         not available
  397.  */
  398. EXTERN_API_C( OSStatus )
  399. HIDGetButtonCapabilities( 
  400.   HIDReportType           reportType,
  401.   HIDButtonCapabilitiesPtr  buttonCaps,
  402.   UInt32 *                buttonCapsSize,
  403.   HIDPreparsedDataRef     preparsedDataRef);
  404.  
  405.  
  406. /*
  407.  *  HIDGetValueCaps()
  408.  *  
  409.  *  Availability:
  410.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  411.  *    CarbonLib:        not available
  412.  *    Mac OS X:         not available
  413.  */
  414. EXTERN_API_C( OSStatus )
  415. HIDGetValueCaps( 
  416.   HIDReportType           reportType,
  417.   HIDValueCapsPtr         valueCaps,
  418.   UInt32 *                valueCapsSize,
  419.   HIDPreparsedDataRef     preparsedDataRef);
  420.  
  421.  
  422. /*
  423.  *  HIDGetValueCapabilities()
  424.  *  
  425.  *  Availability:
  426.  *    Non-Carbon CFM:   available in HIDLib 1.4.3 or later
  427.  *    CarbonLib:        not available
  428.  *    Mac OS X:         not available
  429.  */
  430. EXTERN_API_C( OSStatus )
  431. HIDGetValueCapabilities( 
  432.   HIDReportType           reportType,
  433.   HIDValueCapabilitiesPtr  valueCaps,
  434.   UInt32 *                valueCapsSize,
  435.   HIDPreparsedDataRef     preparsedDataRef);
  436.  
  437.  
  438. /*
  439.  *  HIDGetSpecificButtonCaps()
  440.  *  
  441.  *  Availability:
  442.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  443.  *    CarbonLib:        not available
  444.  *    Mac OS X:         not available
  445.  */
  446. EXTERN_API_C( OSStatus )
  447. HIDGetSpecificButtonCaps( 
  448.   HIDReportType           reportType,
  449.   HIDUsage                usagePage,
  450.   UInt32                  collection,
  451.   HIDUsage                usage,
  452.   HIDButtonCapsPtr        buttonCaps,
  453.   UInt32 *                buttonCapsSize,
  454.   HIDPreparsedDataRef     preparsedDataRef);
  455.  
  456.  
  457. /*
  458.  *  HIDGetSpecificButtonCapabilities()
  459.  *  
  460.  *  Availability:
  461.  *    Non-Carbon CFM:   available in HIDLib 1.4.3 or later
  462.  *    CarbonLib:        not available
  463.  *    Mac OS X:         not available
  464.  */
  465. EXTERN_API_C( OSStatus )
  466. HIDGetSpecificButtonCapabilities( 
  467.   HIDReportType           reportType,
  468.   HIDUsage                usagePage,
  469.   UInt32                  collection,
  470.   HIDUsage                usage,
  471.   HIDButtonCapabilitiesPtr  buttonCaps,
  472.   UInt32 *                buttonCapsSize,
  473.   HIDPreparsedDataRef     preparsedDataRef);
  474.  
  475.  
  476. /*
  477.  *  HIDGetSpecificValueCaps()
  478.  *  
  479.  *  Availability:
  480.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  481.  *    CarbonLib:        not available
  482.  *    Mac OS X:         not available
  483.  */
  484. EXTERN_API_C( OSStatus )
  485. HIDGetSpecificValueCaps( 
  486.   HIDReportType           reportType,
  487.   HIDUsage                usagePage,
  488.   UInt32                  collection,
  489.   HIDUsage                usage,
  490.   HIDValueCapsPtr         valueCaps,
  491.   UInt32 *                valueCapsSize,
  492.   HIDPreparsedDataRef     preparsedDataRef);
  493.  
  494.  
  495. /*
  496.  *  HIDGetSpecificValueCapabilities()
  497.  *  
  498.  *  Availability:
  499.  *    Non-Carbon CFM:   available in HIDLib 1.4.3 or later
  500.  *    CarbonLib:        not available
  501.  *    Mac OS X:         not available
  502.  */
  503. EXTERN_API_C( OSStatus )
  504. HIDGetSpecificValueCapabilities( 
  505.   HIDReportType           reportType,
  506.   HIDUsage                usagePage,
  507.   UInt32                  collection,
  508.   HIDUsage                usage,
  509.   HIDValueCapabilitiesPtr  valueCaps,
  510.   UInt32 *                valueCapsSize,
  511.   HIDPreparsedDataRef     preparsedDataRef);
  512.  
  513.  
  514. /*
  515.  *  HIDGetNextButtonInfo()
  516.  *  
  517.  *  Availability:
  518.  *    Non-Carbon CFM:   available in HIDLib 1.4 or later
  519.  *    CarbonLib:        not available
  520.  *    Mac OS X:         not available
  521.  */
  522. EXTERN_API_C( OSStatus )
  523. HIDGetNextButtonInfo( 
  524.   HIDReportType           reportType,
  525.   HIDUsage                usagePage,
  526.   HIDUsage                usage,
  527.   UInt32 *                collection,
  528.   UInt8 *                 reportID,
  529.   HIDPreparsedDataRef     preparsedDataRef);
  530.  
  531.  
  532. /*
  533.  *  HIDGetNextUsageValueInfo()
  534.  *  
  535.  *  Availability:
  536.  *    Non-Carbon CFM:   available in HIDLib 1.4 or later
  537.  *    CarbonLib:        not available
  538.  *    Mac OS X:         not available
  539.  */
  540. EXTERN_API_C( OSStatus )
  541. HIDGetNextUsageValueInfo( 
  542.   HIDReportType           reportType,
  543.   HIDUsage                usagePage,
  544.   HIDUsage                usage,
  545.   UInt32 *                collection,
  546.   UInt8 *                 reportID,
  547.   HIDPreparsedDataRef     preparsedDataRef);
  548.  
  549.  
  550. /*
  551.  *  HIDMaxUsageListLength()
  552.  *  
  553.  *  Availability:
  554.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  555.  *    CarbonLib:        not available
  556.  *    Mac OS X:         not available
  557.  */
  558. EXTERN_API_C( UInt32 )
  559. HIDMaxUsageListLength( 
  560.   HIDReportType           reportType,
  561.   HIDUsage                usagePage,
  562.   HIDPreparsedDataRef     preparsedDataRef);
  563.  
  564.  
  565. /*
  566.  *  HIDGetReportLength()
  567.  *  
  568.  *  Availability:
  569.  *    Non-Carbon CFM:   available in HIDLib 1.4 or later
  570.  *    CarbonLib:        not available
  571.  *    Mac OS X:         not available
  572.  */
  573. EXTERN_API_C( OSStatus )
  574. HIDGetReportLength( 
  575.   HIDReportType           reportType,
  576.   UInt8                   reportID,
  577.   ByteCount *             reportLength,
  578.   HIDPreparsedDataRef     preparsedDataRef);
  579.  
  580.  
  581. /*
  582.  *  HIDInitReport()
  583.  *  
  584.  *  Availability:
  585.  *    Non-Carbon CFM:   available in HIDLib 1.4 or later
  586.  *    CarbonLib:        not available
  587.  *    Mac OS X:         not available
  588.  */
  589. EXTERN_API_C( OSStatus )
  590. HIDInitReport( 
  591.   HIDReportType           reportType,
  592.   UInt8                   reportID,
  593.   HIDPreparsedDataRef     preparsedDataRef,
  594.   void *                  report,
  595.   ByteCount               reportLength);
  596.  
  597.  
  598.  
  599. /*
  600.  *  HIDGetButtons()
  601.  *  
  602.  *  Availability:
  603.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  604.  *    CarbonLib:        not available
  605.  *    Mac OS X:         not available
  606.  */
  607. EXTERN_API_C( OSStatus )
  608. HIDGetButtons( 
  609.   HIDReportType           reportType,
  610.   UInt32                  collection,
  611.   HIDUsageAndPagePtr      usageList,
  612.   UInt32 *                usageListSize,
  613.   HIDPreparsedDataRef     preparsedDataRef,
  614.   void *                  report,
  615.   ByteCount               reportLength);
  616.  
  617.  
  618. /*
  619.  *  HIDGetButtonsOnPage()
  620.  *  
  621.  *  Availability:
  622.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  623.  *    CarbonLib:        not available
  624.  *    Mac OS X:         not available
  625.  */
  626. EXTERN_API_C( OSStatus )
  627. HIDGetButtonsOnPage( 
  628.   HIDReportType           reportType,
  629.   HIDUsage                usagePage,
  630.   UInt32                  collection,
  631.   HIDUsage *              usageList,
  632.   UInt32 *                usageListSize,
  633.   HIDPreparsedDataRef     preparsedDataRef,
  634.   void *                  report,
  635.   ByteCount               reportLength);
  636.  
  637.  
  638. /*
  639.  *  HIDGetScaledUsageValue()
  640.  *  
  641.  *  Availability:
  642.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  643.  *    CarbonLib:        not available
  644.  *    Mac OS X:         not available
  645.  */
  646. EXTERN_API_C( OSStatus )
  647. HIDGetScaledUsageValue( 
  648.   HIDReportType           reportType,
  649.   HIDUsage                usagePage,
  650.   UInt32                  collection,
  651.   HIDUsage                usage,
  652.   SInt32 *                usageValue,
  653.   HIDPreparsedDataRef     preparsedDataRef,
  654.   void *                  report,
  655.   ByteCount               reportLength);
  656.  
  657.  
  658. /*
  659.  *  HIDGetUsageValue()
  660.  *  
  661.  *  Availability:
  662.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  663.  *    CarbonLib:        not available
  664.  *    Mac OS X:         not available
  665.  */
  666. EXTERN_API_C( OSStatus )
  667. HIDGetUsageValue( 
  668.   HIDReportType           reportType,
  669.   HIDUsage                usagePage,
  670.   UInt32                  collection,
  671.   HIDUsage                usage,
  672.   SInt32 *                usageValue,
  673.   HIDPreparsedDataRef     preparsedDataRef,
  674.   void *                  report,
  675.   ByteCount               reportLength);
  676.  
  677.  
  678. /*
  679.  *  HIDGetUsageValueArray()
  680.  *  
  681.  *  Availability:
  682.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  683.  *    CarbonLib:        not available
  684.  *    Mac OS X:         not available
  685.  */
  686. EXTERN_API_C( OSStatus )
  687. HIDGetUsageValueArray( 
  688.   HIDReportType           reportType,
  689.   HIDUsage                usagePage,
  690.   UInt32                  collection,
  691.   HIDUsage                usage,
  692.   Byte *                  usageValueBuffer,
  693.   ByteCount               usageValueBufferSize,
  694.   HIDPreparsedDataRef     preparsedDataRef,
  695.   void *                  report,
  696.   ByteCount               reportLength);
  697.  
  698.  
  699.  
  700. /*
  701.  *  HIDSetButton()
  702.  *  
  703.  *  Availability:
  704.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  705.  *    CarbonLib:        not available
  706.  *    Mac OS X:         not available
  707.  */
  708. EXTERN_API_C( OSStatus )
  709. HIDSetButton( 
  710.   HIDReportType           reportType,
  711.   HIDUsage                usagePage,
  712.   UInt32                  collection,
  713.   HIDUsage                usage,
  714.   HIDPreparsedDataRef     preparsedDataRef,
  715.   void *                  report,
  716.   ByteCount               reportLength);
  717.  
  718.  
  719. /*
  720.  *  HIDSetButtons()
  721.  *  
  722.  *  Availability:
  723.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  724.  *    CarbonLib:        not available
  725.  *    Mac OS X:         not available
  726.  */
  727. EXTERN_API_C( OSStatus )
  728. HIDSetButtons( 
  729.   HIDReportType           reportType,
  730.   HIDUsage                usagePage,
  731.   UInt32                  collection,
  732.   HIDUsage *              usageList,
  733.   UInt32 *                usageListSize,
  734.   HIDPreparsedDataRef     preparsedDataRef,
  735.   void *                  report,
  736.   ByteCount               reportLength);
  737.  
  738.  
  739. /*
  740.  *  HIDSetScaledUsageValue()
  741.  *  
  742.  *  Availability:
  743.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  744.  *    CarbonLib:        not available
  745.  *    Mac OS X:         not available
  746.  */
  747. EXTERN_API_C( OSStatus )
  748. HIDSetScaledUsageValue( 
  749.   HIDReportType           reportType,
  750.   HIDUsage                usagePage,
  751.   UInt32                  collection,
  752.   HIDUsage                usage,
  753.   SInt32                  usageValue,
  754.   HIDPreparsedDataRef     preparsedDataRef,
  755.   void *                  report,
  756.   ByteCount               reportLength);
  757.  
  758.  
  759. /*
  760.  *  HIDSetUsageValue()
  761.  *  
  762.  *  Availability:
  763.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  764.  *    CarbonLib:        not available
  765.  *    Mac OS X:         not available
  766.  */
  767. EXTERN_API_C( OSStatus )
  768. HIDSetUsageValue( 
  769.   HIDReportType           reportType,
  770.   HIDUsage                usagePage,
  771.   UInt32                  collection,
  772.   HIDUsage                usage,
  773.   SInt32                  usageValue,
  774.   HIDPreparsedDataRef     preparsedDataRef,
  775.   void *                  report,
  776.   ByteCount               reportLength);
  777.  
  778.  
  779. /*
  780.  *  HIDSetUsageValueArray()
  781.  *  
  782.  *  Availability:
  783.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  784.  *    CarbonLib:        not available
  785.  *    Mac OS X:         not available
  786.  */
  787. EXTERN_API_C( OSStatus )
  788. HIDSetUsageValueArray( 
  789.   HIDReportType           reportType,
  790.   HIDUsage                usagePage,
  791.   UInt32                  collection,
  792.   HIDUsage                usage,
  793.   Byte *                  usageValueBuffer,
  794.   ByteCount               usageValueBufferLength,
  795.   HIDPreparsedDataRef     preparsedDataRef,
  796.   void *                  report,
  797.   ByteCount               reportLength);
  798.  
  799.  
  800. /*
  801.  *  HIDUsageListDifference()
  802.  *  
  803.  *  Availability:
  804.  *    Non-Carbon CFM:   available in HIDLib 1.0 or later
  805.  *    CarbonLib:        not available
  806.  *    Mac OS X:         not available
  807.  */
  808. EXTERN_API_C( OSStatus )
  809. HIDUsageListDifference( 
  810.   HIDUsage *              previousUsageList,
  811.   HIDUsage *              currentUsageList,
  812.   HIDUsage *              breakUsageList,
  813.   HIDUsage *              makeUsageList,
  814.   UInt32                  usageListsSize);
  815.  
  816.  
  817. /*
  818.    
  819.     Interfaces for a HID device driver
  820. */
  821.  
  822. /* these are the constants to be passed to HIDGetDeviceInfo*/
  823. #endif  /* CALL_NOT_IN_CARBON */
  824.  
  825. enum {
  826.   kHIDGetInfo_VendorID          = 1,
  827.   kHIDGetInfo_ProductID         = 2,
  828.   kHIDGetInfo_VersionNumber     = 3,
  829.   kHIDGetInfo_InterfaceRef      = 4,
  830.   kHIDGetInfo_MaxReportSize     = 0x10,
  831.   kHIDGetInfo_GetManufacturerString = 0x0100,
  832.   kHIDGetInfo_GetProductString  = 0x0101,
  833.   kHIDGetInfo_GetSerialNumberString = 0x0102,
  834.   kHIDGetInfo_VendorSpecificStart = 0x00010000
  835. };
  836.  
  837. /* these are the valid permissions to pass to HIDOpenDevice*/
  838. enum {
  839.   kHIDPerm_ReadOnly             = 0x0001,
  840.   kHIDPerm_ReadWriteShared      = 0x0003,
  841.   kHIDPerm_ReadWriteExclusive   = 0x0013
  842. };
  843.  
  844. /* these are flags used in HIDInstallReportHandler*/
  845. enum {
  846.   kHIDFlag_CallbackIsResident   = 0x0001
  847. };
  848.  
  849.  
  850. /* these are the constants to be passed to HIDControlDevice*/
  851. enum {
  852.   kHIDVendorSpecificControlStart = 0x00010000
  853. };
  854.  
  855. /* these constant versions are used in the HIDDeviceDispatchTable structure*/
  856. enum {
  857.   kHIDCurrentDispatchTableVersion = 3,
  858.   kHIDOldestCompatableDispatchTableVersion = 1,
  859.   kHIDDispatchTableVersion1     = 1,
  860.   kHIDDispatchTableVersion2     = 2,
  861.   kHIDDispatchTableVersion1OldestCompatible = 1
  862. };
  863.  
  864. typedef struct OpaqueHIDDeviceConnectionRef*  HIDDeviceConnectionRef;
  865. /* HIDGetDeviceInfo is used to get specific information about a HID Device*/
  866. typedef CALLBACK_API_C( OSStatus , HIDGetDeviceInfoProcPtr )(UInt32 inInfoSelector, void *outInfo, ByteCount *ioSize);
  867. /* HIDGetHIDDescriptor is used to get a specific HID descriptor from a HID device (such as a report descriptor)*/
  868. typedef CALLBACK_API_C( OSStatus , HIDGetHIDDescriptorProcPtr )(UInt32 inDescriptorType, UInt32 inDescriptorIndex, void *outDescriptor, UInt32 *ioBufferSize);
  869. /* You must first 'open' a device before using it*/
  870. typedef CALLBACK_API_C( OSStatus , HIDOpenDeviceProcPtr )(HIDDeviceConnectionRef *outConnectionRef, UInt32 permissions, UInt32 reserved);
  871. /* When finished, 'close' a device*/
  872. typedef CALLBACK_API_C( OSStatus , HIDCloseDeviceProcPtr )(HIDDeviceConnectionRef inConnectionRef);
  873. /* User provided ProcPtr to be called when HID report is received*/
  874. typedef CALLBACK_API_C( void , HIDReportHandlerProcPtr )(void *inHIDReport, UInt32 inHIDReportLength, UInt32 inRefcon);
  875. /* User provided ProcPtr to be called when indexed string is received*/
  876. typedef CALLBACK_API_C( void , HIDStringHandlerProcPtr )(void *inHIDReport, UInt32 inHIDReportLength, UInt32 inRefcon, OSStatus inStatus);
  877. /*
  878.    When installed, a report handler is called at defered task time (unless kHIDFlag_CallbackIsResident is passed) 
  879.    whenever an interrupt packet is recieved on the first interrupt in pipe. The supplied refcon is also passed thru.
  880. */
  881. typedef CALLBACK_API_C( OSStatus , HIDInstallReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 flags, HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
  882. /* When finished, remove the report handler.*/
  883. typedef CALLBACK_API_C( OSStatus , HIDRemoveReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef);
  884. /* If there was a HIDReportHandler installed previous to the one from this connection, pass that one this report*/
  885. typedef CALLBACK_API_C( OSStatus , HIDCallPreviousReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef, void *inHIDReport, UInt32 inHIDReportLength);
  886. /*
  887.    HIDGetReport is used to get a report (of type input, output, or feature) directly from a HID device
  888.    the HIDReportHandler will be called with the report when it is received.
  889. */
  890. typedef CALLBACK_API_C( OSStatus , HIDGetReportProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType, UInt32 inReportID, HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
  891. /* HIDGetSizedReport is used like HIDGetReport, but for devices that require exact size to return report.*/
  892. typedef CALLBACK_API_C( OSStatus , HIDGetSizedReportProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType, UInt32 inReportID, ByteCount inSize, HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
  893. /* HIDSetReport is used to send a report (of type input, output, or feature) directly to a HID device*/
  894. typedef CALLBACK_API_C( OSStatus , HIDSetReportProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType, UInt32 inReportID, void *inInfo, ByteCount inSize);
  895. /* HIDControlDevice is used to send misc control messages to a device*/
  896. typedef CALLBACK_API_C( OSStatus , HIDControlDeviceProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inControlSelector, void *ioControlData);
  897. /*
  898.    HIDGetIndexedString is used to get a string directly from a HID device.
  899.    The HIDStringHandler will be called with the string when it is received or nil string if completed with an error.
  900. */
  901. typedef CALLBACK_API_C( OSStatus , HIDGetIndexedStringProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inStringIndex, UInt32 inStringLanguage, HIDStringHandlerProcPtr inStringHandlerProc, UInt32 inRefcon);
  902. /*
  903.    dispatchTableCurrentVersion is kHIDCurrentDispatchTableVersion
  904.    dispatchTableOldestVersion is kHIDOldestCompatableDispatchTableVersion
  905.         (the oldest built client using this API that this HID device driver will work with)
  906.    vendorID is who wrote this HID device driver (hi word of 0 and USB vendorID is valid)
  907. */
  908.  
  909. struct HIDDeviceDispatchTable {
  910.   UInt32              dispatchTableCurrentVersion;
  911.   UInt32              dispatchTableOldestVersion;
  912.   UInt32              vendorID;
  913.   UInt32              vendorSpecific;
  914.   UInt32              reserved;
  915.  
  916.   HIDGetDeviceInfoProcPtr  pHIDGetDeviceInfo;
  917.   HIDGetHIDDescriptorProcPtr  pHIDGetHIDDescriptor;
  918.   HIDOpenDeviceProcPtr  pHIDOpenDevice;
  919.   HIDCloseDeviceProcPtr  pHIDCloseDevice;
  920.   HIDInstallReportHandlerProcPtr  pHIDInstallReportHandler;
  921.   HIDRemoveReportHandlerProcPtr  pHIDRemoveReportHandler;
  922.   HIDCallPreviousReportHandlerProcPtr  pHIDCallPreviousReportHandler;
  923.   HIDGetReportProcPtr  pHIDGetReport;         /* new for vers 2, was reserved in version 1*/
  924.   HIDSetReportProcPtr  pHIDSetReport;         /* new for vers 2, was reserved in version 1*/
  925.   HIDControlDeviceProcPtr  pHIDControlDevice;
  926.   HIDGetIndexedStringProcPtr  pHIDGetIndexedString; /* new for vers 3*/
  927.   HIDGetSizedReportProcPtr  pHIDGetSizedReport; /* new for vers 3*/
  928. };
  929. typedef struct HIDDeviceDispatchTable   HIDDeviceDispatchTable;
  930. typedef HIDDeviceDispatchTable *        HIDDeviceDispatchTablePtr;
  931. /* A USB HIDDevice driver should export a HIDDeviceDispatchTable symbol */
  932. /* in it's PEF container, with the name "\pTheHIDDeviceDispatchTable" */
  933.  
  934.  
  935. /* ****************************************************************************************** */
  936. /* HID Usage Tables                                                                           */
  937. /*                                                                                            */
  938. /* The following constants are from the USB 'HID Usage Tables' specification, revision 1.1rc3 */
  939. /* ****************************************************************************************** */
  940.  
  941. /* Usage Pages */
  942. enum {
  943.   kHIDPage_Undefined            = 0x00,
  944.   kHIDPage_GenericDesktop       = 0x01,
  945.   kHIDPage_Simulation           = 0x02,
  946.   kHIDPage_VR                   = 0x03,
  947.   kHIDPage_Sport                = 0x04,
  948.   kHIDPage_Game                 = 0x05, /* Reserved 0x06 */
  949.   kHIDPage_KeyboardOrKeypad     = 0x07, /* USB Device Class Definition for Human Interface Devices (HID). Note: the usage type for all key codes is Selector (Sel). */
  950.   kHIDPage_LEDs                 = 0x08,
  951.   kHIDPage_Button               = 0x09,
  952.   kHIDPage_Ordinal              = 0x0A,
  953.   kHIDPage_Telephony            = 0x0B,
  954.   kHIDPage_Consumer             = 0x0C,
  955.   kHIDPage_Digitizer            = 0x0D, /* Reserved 0x0E */
  956.   kHIDPage_PID                  = 0x0F, /* USB Physical Interface Device definitions for force feedback and related devices. */
  957.   kHIDPage_Unicode              = 0x10, /* Reserved 0x11 - 0x13 */
  958.   kHIDPage_AlphanumericDisplay  = 0x14, /* Reserved 0x15 - 0x7F */
  959.                                         /* Monitor 0x80 - 0x83     USB Device Class Definition for Monitor Devices */
  960.                                         /* Power 0x84 - 0x87   USB Device Class Definition for Power Devices */
  961.                                         /* Reserved 0x88 - 0x8B */
  962.   kHIDPage_BarCodeScanner       = 0x8C, /* (Point of Sale) USB Device Class Definition for Bar Code Scanner Devices */
  963.   kHIDPage_Scale                = 0x8D, /* (Point of Sale) USB Device Class Definition for Scale Devices */
  964.                                         /* ReservedPointofSalepages 0x8E - 0x8F */
  965.   kHIDPage_CameraControl        = 0x90, /* USB Device Class Definition for Image Class Devices */
  966.   kHIDPage_Arcade               = 0x91, /* OAAF Definitions for arcade and coinop related Devices */
  967.                                         /* Reserved 0x92 - 0xFEFF */
  968.                                         /* VendorDefined 0xFF00 - 0xFFFF */
  969.   kHIDPage_VendorDefinedStart   = 0xFF00
  970. };
  971.  
  972. /* Undefined Usage for all usage pages */
  973. enum {
  974.   kHIDUsage_Undefined           = 0x00
  975. };
  976.  
  977. /* GenericDesktop Page (0x01) */
  978. enum {
  979.   kHIDUsage_GD_Pointer          = 0x01, /* Physical Collection */
  980.   kHIDUsage_GD_Mouse            = 0x02, /* Application Collection */
  981.                                         /* 0x03 Reserved */
  982.   kHIDUsage_GD_Joystick         = 0x04, /* Application Collection */
  983.   kHIDUsage_GD_GamePad          = 0x05, /* Application Collection */
  984.   kHIDUsage_GD_Keyboard         = 0x06, /* Application Collection */
  985.   kHIDUsage_GD_Keypad           = 0x07, /* Application Collection */
  986.   kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */
  987.                                         /* 0x09 - 0x2F Reserved */
  988.   kHIDUsage_GD_X                = 0x30, /* Dynamic Value */
  989.   kHIDUsage_GD_Y                = 0x31, /* Dynamic Value */
  990.   kHIDUsage_GD_Z                = 0x32, /* Dynamic Value */
  991.   kHIDUsage_GD_Rx               = 0x33, /* Dynamic Value */
  992.   kHIDUsage_GD_Ry               = 0x34, /* Dynamic Value */
  993.   kHIDUsage_GD_Rz               = 0x35, /* Dynamic Value */
  994.   kHIDUsage_GD_Slider           = 0x36, /* Dynamic Value */
  995.   kHIDUsage_GD_Dial             = 0x37, /* Dynamic Value */
  996.   kHIDUsage_GD_Wheel            = 0x38, /* Dynamic Value */
  997.   kHIDUsage_GD_Hatswitch        = 0x39, /* Dynamic Value */
  998.   kHIDUsage_GD_CountedBuffer    = 0x3A, /* Logical Collection */
  999.   kHIDUsage_GD_ByteCount        = 0x3B, /* Dynamic Value */
  1000.   kHIDUsage_GD_MotionWakeup     = 0x3C, /* One-Shot Control */
  1001.   kHIDUsage_GD_Start            = 0x3D, /* On/Off Control */
  1002.   kHIDUsage_GD_Select           = 0x3E, /* On/Off Control */
  1003.                                         /* 0x3F Reserved */
  1004.   kHIDUsage_GD_Vx               = 0x40, /* Dynamic Value */
  1005.   kHIDUsage_GD_Vy               = 0x41, /* Dynamic Value */
  1006.   kHIDUsage_GD_Vz               = 0x42, /* Dynamic Value */
  1007.   kHIDUsage_GD_Vbrx             = 0x43, /* Dynamic Value */
  1008.   kHIDUsage_GD_Vbry             = 0x44, /* Dynamic Value */
  1009.   kHIDUsage_GD_Vbrz             = 0x45, /* Dynamic Value */
  1010.   kHIDUsage_GD_Vno              = 0x46, /* Dynamic Value */
  1011.                                         /* 0x47 - 0x7F Reserved */
  1012.   kHIDUsage_GD_SystemControl    = 0x80, /* Application Collection */
  1013.   kHIDUsage_GD_SystemPowerDown  = 0x81, /* One-Shot Control */
  1014.   kHIDUsage_GD_SystemSleep      = 0x82, /* One-Shot Control */
  1015.   kHIDUsage_GD_SystemWakeUp     = 0x83, /* One-Shot Control */
  1016.   kHIDUsage_GD_SystemContextMenu = 0x84, /* One-Shot Control */
  1017.   kHIDUsage_GD_SystemMainMenu   = 0x85, /* One-Shot Control */
  1018.   kHIDUsage_GD_SystemAppMenu    = 0x86, /* One-Shot Control */
  1019.   kHIDUsage_GD_SystemMenuHelp   = 0x87, /* One-Shot Control */
  1020.   kHIDUsage_GD_SystemMenuExit   = 0x88, /* One-Shot Control */
  1021.   kHIDUsage_GD_SystemMenu       = 0x89, /* Selector */
  1022.   kHIDUsage_GD_SystemMenuRight  = 0x8A, /* Re-Trigger Control */
  1023.   kHIDUsage_GD_SystemMenuLeft   = 0x8B, /* Re-Trigger Control */
  1024.   kHIDUsage_GD_SystemMenuUp     = 0x8C, /* Re-Trigger Control */
  1025.   kHIDUsage_GD_SystemMenuDown   = 0x8D, /* Re-Trigger Control */
  1026.                                         /* 0x8E - 0x8F Reserved */
  1027.   kHIDUsage_GD_DPadUp           = 0x90, /* On/Off Control */
  1028.   kHIDUsage_GD_DPadDown         = 0x91, /* On/Off Control */
  1029.   kHIDUsage_GD_DPadRight        = 0x92, /* On/Off Control */
  1030.   kHIDUsage_GD_DPadLeft         = 0x93, /* On/Off Control */
  1031.                                         /* 0x94 - 0xFFFF Reserved */
  1032.   kHIDUsage_GD_Reserved         = 0xFFFF
  1033. };
  1034.  
  1035. /* Simulation Page (0x02) */
  1036. /* This section provides detailed descriptions of the usages employed by simulation devices. */
  1037. enum {
  1038.   kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */
  1039.   kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */
  1040.   kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */
  1041.   kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */
  1042.   kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */
  1043.   kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */
  1044.   kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */
  1045.   kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */
  1046.   kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */
  1047.   kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */
  1048.   kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */
  1049.   kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */
  1050.                                         /* 0x0D - 0x1F Reserved */
  1051.   kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */
  1052.   kHIDUsage_Sim_FlightStick     = 0x21, /* Application Collection */
  1053.   kHIDUsage_Sim_CyclicControl   = 0x22, /* Physical Collection */
  1054.   kHIDUsage_Sim_CyclicTrim      = 0x23, /* Physical Collection */
  1055.   kHIDUsage_Sim_FlightYoke      = 0x24, /* Application Collection */
  1056.   kHIDUsage_Sim_TrackControl    = 0x25, /* Physical Collection */
  1057.                                         /* 0x26 - 0xAF Reserved */
  1058.   kHIDUsage_Sim_Aileron         = 0xB0, /* Dynamic Value */
  1059.   kHIDUsage_Sim_AileronTrim     = 0xB1, /* Dynamic Value */
  1060.   kHIDUsage_Sim_AntiTorqueControl = 0xB2, /* Dynamic Value */
  1061.   kHIDUsage_Sim_AutopilotEnable = 0xB3, /* On/Off Control */
  1062.   kHIDUsage_Sim_ChaffRelease    = 0xB4, /* One-Shot Control */
  1063.   kHIDUsage_Sim_CollectiveControl = 0xB5, /* Dynamic Value */
  1064.   kHIDUsage_Sim_DiveBrake       = 0xB6, /* Dynamic Value */
  1065.   kHIDUsage_Sim_ElectronicCountermeasures = 0xB7, /* On/Off Control */
  1066.   kHIDUsage_Sim_Elevator        = 0xB8, /* Dynamic Value */
  1067.   kHIDUsage_Sim_ElevatorTrim    = 0xB9, /* Dynamic Value */
  1068.   kHIDUsage_Sim_Rudder          = 0xBA, /* Dynamic Value */
  1069.   kHIDUsage_Sim_Throttle        = 0xBB, /* Dynamic Value */
  1070.   kHIDUsage_Sim_FlightCommunications = 0xBC, /* On/Off Control */
  1071.   kHIDUsage_Sim_FlareRelease    = 0xBD, /* One-Shot Control */
  1072.   kHIDUsage_Sim_LandingGear     = 0xBE, /* On/Off Control */
  1073.   kHIDUsage_Sim_ToeBrake        = 0xBF, /* Dynamic Value */
  1074.   kHIDUsage_Sim_Trigger         = 0xC0, /* Momentary Control */
  1075.   kHIDUsage_Sim_WeaponsArm      = 0xC1, /* On/Off Control */
  1076.   kHIDUsage_Sim_Weapons         = 0xC2, /* Selector */
  1077.   kHIDUsage_Sim_WingFlaps       = 0xC3, /* Dynamic Value */
  1078.   kHIDUsage_Sim_Accelerator     = 0xC4, /* Dynamic Value */
  1079.   kHIDUsage_Sim_Brake           = 0xC5, /* Dynamic Value */
  1080.   kHIDUsage_Sim_Clutch          = 0xC6, /* Dynamic Value */
  1081.   kHIDUsage_Sim_Shifter         = 0xC7, /* Dynamic Value */
  1082.   kHIDUsage_Sim_Steering        = 0xC8, /* Dynamic Value */
  1083.   kHIDUsage_Sim_TurretDirection = 0xC9, /* Dynamic Value */
  1084.   kHIDUsage_Sim_BarrelElevation = 0xCA, /* Dynamic Value */
  1085.   kHIDUsage_Sim_DivePlane       = 0xCB, /* Dynamic Value */
  1086.   kHIDUsage_Sim_Ballast         = 0xCC, /* Dynamic Value */
  1087.   kHIDUsage_Sim_BicycleCrank    = 0xCD, /* Dynamic Value */
  1088.   kHIDUsage_Sim_HandleBars      = 0xCE, /* Dynamic Value */
  1089.   kHIDUsage_Sim_FrontBrake      = 0xCF, /* Dynamic Value */
  1090.   kHIDUsage_Sim_RearBrake       = 0xD0, /* Dynamic Value */
  1091.                                         /* 0xD1 - 0xFFFF Reserved */
  1092.   kHIDUsage_Sim_Reserved        = 0xFFFF
  1093. };
  1094.  
  1095. /* VR Page (0x03) */
  1096. /* Virtual Reality controls depend on designators to identify the individual controls. Most of the following are */
  1097. /* usages are applied to the collections of entities that comprise the actual device. */
  1098. enum {
  1099.   kHIDUsage_VR_Belt             = 0x01, /* Application Collection */
  1100.   kHIDUsage_VR_BodySuit         = 0x02, /* Application Collection */
  1101.   kHIDUsage_VR_Flexor           = 0x03, /* Physical Collection */
  1102.   kHIDUsage_VR_Glove            = 0x04, /* Application Collection */
  1103.   kHIDUsage_VR_HeadTracker      = 0x05, /* Physical Collection */
  1104.   kHIDUsage_VR_HeadMountedDisplay = 0x06, /* Application Collection */
  1105.   kHIDUsage_VR_HandTracker      = 0x07, /* Application Collection */
  1106.   kHIDUsage_VR_Oculometer       = 0x08, /* Application Collection */
  1107.   kHIDUsage_VR_Vest             = 0x09, /* Application Collection */
  1108.   kHIDUsage_VR_AnimatronicDevice = 0x0A, /* Application Collection */
  1109.                                         /* 0x0B - 0x1F Reserved */
  1110.   kHIDUsage_VR_StereoEnable     = 0x20, /* On/Off Control */
  1111.   kHIDUsage_VR_DisplayEnable    = 0x21, /* On/Off Control */
  1112.                                         /* 0x22 - 0xFFFF Reserved */
  1113.   kHIDUsage_VR_Reserved         = 0xFFFF
  1114. };
  1115.  
  1116. /* Sport Page (0x04) */
  1117. enum {
  1118.   kHIDUsage_Sprt_BaseballBat    = 0x01, /* Application Collection */
  1119.   kHIDUsage_Sprt_GolfClub       = 0x02, /* Application Collection */
  1120.   kHIDUsage_Sprt_RowingMachine  = 0x03, /* Application Collection */
  1121.   kHIDUsage_Sprt_Treadmill      = 0x04, /* Application Collection */
  1122.                                         /* 0x05 - 0x2F Reserved */
  1123.   kHIDUsage_Sprt_Oar            = 0x30, /* Dynamic Value */
  1124.   kHIDUsage_Sprt_Slope          = 0x31, /* Dynamic Value */
  1125.   kHIDUsage_Sprt_Rate           = 0x32, /* Dynamic Value */
  1126.   kHIDUsage_Sprt_StickSpeed     = 0x33, /* Dynamic Value */
  1127.   kHIDUsage_Sprt_StickFaceAngle = 0x34, /* Dynamic Value */
  1128.   kHIDUsage_Sprt_StickHeelOrToe = 0x35, /* Dynamic Value */
  1129.   kHIDUsage_Sprt_StickFollowThrough = 0x36, /* Dynamic Value */
  1130.   kHIDUsage_Sprt_StickTempo     = 0x37, /* Dynamic Value */
  1131.   kHIDUsage_Sprt_StickType      = 0x38, /* Named Array */
  1132.   kHIDUsage_Sprt_StickHeight    = 0x39, /* Dynamic Value */
  1133.                                         /* 0x3A - 0x4F Reserved */
  1134.   kHIDUsage_Sprt_Putter         = 0x50, /* Selector */
  1135.   kHIDUsage_Sprt_1Iron          = 0x51, /* Selector */
  1136.   kHIDUsage_Sprt_2Iron          = 0x52, /* Selector */
  1137.   kHIDUsage_Sprt_3Iron          = 0x53, /* Selector */
  1138.   kHIDUsage_Sprt_4Iron          = 0x54, /* Selector */
  1139.   kHIDUsage_Sprt_5Iron          = 0x55, /* Selector */
  1140.   kHIDUsage_Sprt_6Iron          = 0x56, /* Selector */
  1141.   kHIDUsage_Sprt_7Iron          = 0x57, /* Selector */
  1142.   kHIDUsage_Sprt_8Iron          = 0x58, /* Selector */
  1143.   kHIDUsage_Sprt_9Iron          = 0x59, /* Selector */
  1144.   kHIDUsage_Sprt_10Iron         = 0x5A, /* Selector */
  1145.   kHIDUsage_Sprt_11Iron         = 0x5B, /* Selector */
  1146.   kHIDUsage_Sprt_SandWedge      = 0x5C, /* Selector */
  1147.   kHIDUsage_Sprt_LoftWedge      = 0x5D, /* Selector */
  1148.   kHIDUsage_Sprt_PowerWedge     = 0x5E, /* Selector */
  1149.   kHIDUsage_Sprt_1Wood          = 0x5F, /* Selector */
  1150.   kHIDUsage_Sprt_3Wood          = 0x60, /* Selector */
  1151.   kHIDUsage_Sprt_5Wood          = 0x61, /* Selector */
  1152.   kHIDUsage_Sprt_7Wood          = 0x62, /* Selector */
  1153.   kHIDUsage_Sprt_9Wood          = 0x63, /* Selector */
  1154.                                         /* 0x64 - 0xFFFF Reserved */
  1155.   kHIDUsage_Sprt_Reserved       = 0xFFFF
  1156. };
  1157.  
  1158. /* Game Page (0x05) */
  1159. enum {
  1160.   kHIDUsage_Game_3DGameController = 0x01, /* Application Collection */
  1161.   kHIDUsage_Game_PinballDevice  = 0x02, /* Application Collection */
  1162.   kHIDUsage_Game_GunDevice      = 0x03, /* Application Collection */
  1163.                                         /* 0x04 - 0x1F Reserved */
  1164.   kHIDUsage_Game_PointofView    = 0x20, /* Physical Collection */
  1165.   kHIDUsage_Game_TurnRightOrLeft = 0x21, /* Dynamic Value */
  1166.   kHIDUsage_Game_PitchUpOrDown  = 0x22, /* Dynamic Value */
  1167.   kHIDUsage_Game_RollRightOrLeft = 0x23, /* Dynamic Value */
  1168.   kHIDUsage_Game_MoveRightOrLeft = 0x24, /* Dynamic Value */
  1169.   kHIDUsage_Game_MoveForwardOrBackward = 0x25, /* Dynamic Value */
  1170.   kHIDUsage_Game_MoveUpOrDown   = 0x26, /* Dynamic Value */
  1171.   kHIDUsage_Game_LeanRightOrLeft = 0x27, /* Dynamic Value */
  1172.   kHIDUsage_Game_LeanForwardOrBackward = 0x28, /* Dynamic Value */
  1173.   kHIDUsage_Game_HeightOfPOV    = 0x29, /* Dynamic Value */
  1174.   kHIDUsage_Game_Flipper        = 0x2A, /* Momentary Control */
  1175.   kHIDUsage_Game_SecondaryFlipper = 0x2B, /* Momentary Control */
  1176.   kHIDUsage_Game_Bump           = 0x2C, /* Momentary Control */
  1177.   kHIDUsage_Game_NewGame        = 0x2D, /* One-Shot Control */
  1178.   kHIDUsage_Game_ShootBall      = 0x2E, /* One-Shot Control */
  1179.   kHIDUsage_Game_Player         = 0x2F, /* One-Shot Control */
  1180.   kHIDUsage_Game_GunBolt        = 0x30, /* On/Off Control */
  1181.   kHIDUsage_Game_GunClip        = 0x31, /* On/Off Control */
  1182.   kHIDUsage_Game_Gun            = 0x32, /* Selector */
  1183.   kHIDUsage_Game_GunSingleShot  = 0x33, /* Selector */
  1184.   kHIDUsage_Game_GunBurst       = 0x34, /* Selector */
  1185.   kHIDUsage_Game_GunAutomatic   = 0x35, /* Selector */
  1186.   kHIDUsage_Game_GunSafety      = 0x36, /* On/Off Control */
  1187.   kHIDUsage_Game_GamepadFireOrJump = 0x37, /* Logical Collection */
  1188.   kHIDUsage_Game_GamepadTrigger = 0x39, /* Logical Collection */
  1189.                                         /* 0x3A - 0xFFFF Reserved */
  1190.   kHIDUsage_Game_Reserved       = 0xFFFF
  1191. };
  1192.  
  1193. /* KeyboardOrKeypad Page (0x07) */
  1194. /* This section is the Usage Page for key codes to be used in implementing a USB keyboard.  */
  1195. /* A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as */
  1196. /* indicated in the “Boot” column below. */
  1197. /* The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) */
  1198. /* to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */
  1199. /* Note: A general note on Usages and languages: */
  1200. /* Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings */
  1201. /* for every language. Where this list is not specific for a key function in a language, the closest equivalent key */
  1202. /* position should be used, so that a keyboard may be modified for a different language by simply printing different */
  1203. /* keycaps. One example is the Y key on a North American keyboard. In Germany this is typically Z. Rather than changing */
  1204. /* the keyboard firmware to put the Z Usage into that place in the descriptor list, the vendor should use the Y Usage on */
  1205. /* both the North American and German keyboards. This continues to be the existing practice in the industry, in order to */
  1206. /* minimize the number of changes to the electronics to accommodate otherlanguages. */
  1207. enum {
  1208.   kHIDUsage_KeyboardErrorRollOver = 0x01, /* ErrorRollOver */
  1209.   kHIDUsage_KeyboardPOSTFail    = 0x02, /* POSTFail */
  1210.   kHIDUsage_KeyboardErrorUndefined = 0x03, /* ErrorUndefined */
  1211.   kHIDUsage_KeyboardA           = 0x04, /* a or A */
  1212.   kHIDUsage_KeyboardB           = 0x05, /* b or B */
  1213.   kHIDUsage_KeyboardC           = 0x06, /* c or C */
  1214.   kHIDUsage_KeyboardD           = 0x07, /* d or D */
  1215.   kHIDUsage_KeyboardE           = 0x08, /* e or E */
  1216.   kHIDUsage_KeyboardF           = 0x09, /* f or F */
  1217.   kHIDUsage_KeyboardG           = 0x0A, /* g or G */
  1218.   kHIDUsage_KeyboardH           = 0x0B, /* h or H */
  1219.   kHIDUsage_KeyboardI           = 0x0C, /* i or I */
  1220.   kHIDUsage_KeyboardJ           = 0x0D, /* j or J */
  1221.   kHIDUsage_KeyboardK           = 0x0E, /* k or K */
  1222.   kHIDUsage_KeyboardL           = 0x0F, /* l or L */
  1223.   kHIDUsage_KeyboardM           = 0x10, /* m or M */
  1224.   kHIDUsage_KeyboardN           = 0x11, /* n or N */
  1225.   kHIDUsage_KeyboardO           = 0x12, /* o or O */
  1226.   kHIDUsage_KeyboardP           = 0x13, /* p or P */
  1227.   kHIDUsage_KeyboardQ           = 0x14, /* q or Q */
  1228.   kHIDUsage_KeyboardR           = 0x15, /* r or R */
  1229.   kHIDUsage_KeyboardS           = 0x16, /* s or S */
  1230.   kHIDUsage_KeyboardT           = 0x17, /* t or T */
  1231.   kHIDUsage_KeyboardU           = 0x18, /* u or U */
  1232.   kHIDUsage_KeyboardV           = 0x19, /* v or V */
  1233.   kHIDUsage_KeyboardW           = 0x1A, /* w or W */
  1234.   kHIDUsage_KeyboardX           = 0x1B, /* x or X */
  1235.   kHIDUsage_KeyboardY           = 0x1C, /* y or Y */
  1236.   kHIDUsage_KeyboardZ           = 0x1D, /* z or Z */
  1237.   kHIDUsage_Keyboard1           = 0x1E, /* 1 or ! */
  1238.   kHIDUsage_Keyboard2           = 0x1F, /* 2 or @ */
  1239.   kHIDUsage_Keyboard3           = 0x20, /* 3 or # */
  1240.   kHIDUsage_Keyboard4           = 0x21, /* 4 or $ */
  1241.   kHIDUsage_Keyboard5           = 0x22, /* 5 or % */
  1242.   kHIDUsage_Keyboard6           = 0x23, /* 6 or ^ */
  1243.   kHIDUsage_Keyboard7           = 0x24, /* 7 or & */
  1244.   kHIDUsage_Keyboard8           = 0x25, /* 8 or * */
  1245.   kHIDUsage_Keyboard9           = 0x26, /* 9 or ( */
  1246.   kHIDUsage_Keyboard0           = 0x27, /* 0 or ) */
  1247.   kHIDUsage_KeyboardReturnOrEnter = 0x28, /* Return (Enter) */
  1248.   kHIDUsage_KeyboardEscape      = 0x29, /* Escape */
  1249.   kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, /* Delete (Backspace) */
  1250.   kHIDUsage_KeyboardTab         = 0x2B, /* Tab */
  1251.   kHIDUsage_KeyboardSpacebar    = 0x2C, /* Spacebar */
  1252.   kHIDUsage_KeyboardHyphen      = 0x2D, /* - or _ */
  1253.   kHIDUsage_KeyboardEqualSign   = 0x2E, /* = or + */
  1254.   kHIDUsage_KeyboardOpenBracket = 0x2F, /* [ or { */
  1255.   kHIDUsage_KeyboardCloseBracket = 0x30, /* ] or } */
  1256.   kHIDUsage_KeyboardBackslash   = 0x31, /* \ or | */
  1257.   kHIDUsage_KeyboardNonUSPound  = 0x32, /* Non-US # or _ */
  1258.   kHIDUsage_KeyboardSemicolon   = 0x33, /* ; or : */
  1259.   kHIDUsage_KeyboardQuote       = 0x34, /* ' or " */
  1260.   kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde */
  1261.   kHIDUsage_KeyboardComma       = 0x36, /* , or < */
  1262.   kHIDUsage_KeyboardPeriod      = 0x37, /* . or > */
  1263.   kHIDUsage_KeyboardSlash       = 0x38, /* / or ? */
  1264.   kHIDUsage_KeyboardCapsLock    = 0x39, /* Caps Lock */
  1265.   kHIDUsage_KeyboardF1          = 0x3A, /* F1 */
  1266.   kHIDUsage_KeyboardF2          = 0x3B, /* F2 */
  1267.   kHIDUsage_KeyboardF3          = 0x3C, /* F3 */
  1268.   kHIDUsage_KeyboardF4          = 0x3D, /* F4 */
  1269.   kHIDUsage_KeyboardF5          = 0x3E, /* F5 */
  1270.   kHIDUsage_KeyboardF6          = 0x3F, /* F6 */
  1271.   kHIDUsage_KeyboardF7          = 0x40, /* F7 */
  1272.   kHIDUsage_KeyboardF8          = 0x41, /* F8 */
  1273.   kHIDUsage_KeyboardF9          = 0x42, /* F9 */
  1274.   kHIDUsage_KeyboardF10         = 0x43, /* F10 */
  1275.   kHIDUsage_KeyboardF11         = 0x44, /* F11 */
  1276.   kHIDUsage_KeyboardF12         = 0x45, /* F12 */
  1277.   kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen */
  1278.   kHIDUsage_KeyboardScrollLock  = 0x47, /* Scroll Lock */
  1279.   kHIDUsage_KeyboardPause       = 0x48, /* Pause */
  1280.   kHIDUsage_KeyboardInsert      = 0x49, /* Insert */
  1281.   kHIDUsage_KeyboardHome        = 0x4A, /* Home */
  1282.   kHIDUsage_KeyboardPageUp      = 0x4B, /* Page Up */
  1283.   kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward */
  1284.   kHIDUsage_KeyboardEnd         = 0x4D, /* End */
  1285.   kHIDUsage_KeyboardPageDown    = 0x4E, /* Page Down */
  1286.   kHIDUsage_KeyboardRightArrow  = 0x4F, /* Right Arrow */
  1287.   kHIDUsage_KeyboardLeftArrow   = 0x50, /* Left Arrow */
  1288.   kHIDUsage_KeyboardDownArrow   = 0x51, /* Down Arrow */
  1289.   kHIDUsage_KeyboardUpArrow     = 0x52, /* Up Arrow */
  1290.   kHIDUsage_KeypadNumLock       = 0x53, /* Keypad NumLock or Clear */
  1291.   kHIDUsage_KeypadSlash         = 0x54, /* Keypad / */
  1292.   kHIDUsage_KeypadAsterisk      = 0x55, /* Keypad * */
  1293.   kHIDUsage_KeypadHyphen        = 0x56, /* Keypad - */
  1294.   kHIDUsage_KeypadPlus          = 0x57, /* Keypad + */
  1295.   kHIDUsage_KeypadEnter         = 0x58, /* Keypad Enter */
  1296.   kHIDUsage_Keypad1             = 0x59, /* Keypad 1 or End */
  1297.   kHIDUsage_Keypad2             = 0x5A, /* Keypad 2 or Down Arrow */
  1298.   kHIDUsage_Keypad3             = 0x5B, /* Keypad 3 or Page Down */
  1299.   kHIDUsage_Keypad4             = 0x5C, /* Keypad 4 or Left Arrow */
  1300.   kHIDUsage_Keypad5             = 0x5D, /* Keypad 5 */
  1301.   kHIDUsage_Keypad6             = 0x5E, /* Keypad 6 or Right Arrow */
  1302.   kHIDUsage_Keypad7             = 0x5F, /* Keypad 7 or Home */
  1303.   kHIDUsage_Keypad8             = 0x60, /* Keypad 8 or Up Arrow */
  1304.   kHIDUsage_Keypad9             = 0x61, /* Keypad 9 or Page Up */
  1305.   kHIDUsage_Keypad0             = 0x62, /* Keypad 0 or Insert */
  1306.   kHIDUsage_KeypadPeriod        = 0x63, /* Keypad . or Delete */
  1307.   kHIDUsage_KeyboardNonUSBackslash = 0x64, /* Non-US \ or | */
  1308.   kHIDUsage_KeyboardApplication = 0x65, /* Application */
  1309.   kHIDUsage_KeyboardPower       = 0x66, /* Power */
  1310.   kHIDUsage_KeypadEqualSign     = 0x67, /* Keypad = */
  1311.   kHIDUsage_KeyboardF13         = 0x68, /* F13 */
  1312.   kHIDUsage_KeyboardF14         = 0x69, /* F14 */
  1313.   kHIDUsage_KeyboardF15         = 0x6A, /* F15 */
  1314.   kHIDUsage_KeyboardF16         = 0x6B, /* F16 */
  1315.   kHIDUsage_KeyboardF17         = 0x6C, /* F17 */
  1316.   kHIDUsage_KeyboardF18         = 0x6D, /* F18 */
  1317.   kHIDUsage_KeyboardF19         = 0x6E, /* F19 */
  1318.   kHIDUsage_KeyboardF20         = 0x6F, /* F20 */
  1319.   kHIDUsage_KeyboardF21         = 0x70, /* F21 */
  1320.   kHIDUsage_KeyboardF22         = 0x71, /* F22 */
  1321.   kHIDUsage_KeyboardF23         = 0x72, /* F23 */
  1322.   kHIDUsage_KeyboardF24         = 0x73, /* F24 */
  1323.   kHIDUsage_KeyboardExecute     = 0x74, /* Execute */
  1324.   kHIDUsage_KeyboardHelp        = 0x75, /* Help */
  1325.   kHIDUsage_KeyboardMenu        = 0x76, /* Menu */
  1326.   kHIDUsage_KeyboardSelect      = 0x77, /* Select */
  1327.   kHIDUsage_KeyboardStop        = 0x78, /* Stop */
  1328.   kHIDUsage_KeyboardAgain       = 0x79, /* Again */
  1329.   kHIDUsage_KeyboardUndo        = 0x7A, /* Undo */
  1330.   kHIDUsage_KeyboardCut         = 0x7B, /* Cut */
  1331.   kHIDUsage_KeyboardCopy        = 0x7C, /* Copy */
  1332.   kHIDUsage_KeyboardPaste       = 0x7D, /* Paste */
  1333.   kHIDUsage_KeyboardFind        = 0x7E, /* Find */
  1334.   kHIDUsage_KeyboardMute        = 0x7F, /* Mute */
  1335.   kHIDUsage_KeyboardVolumeUp    = 0x80, /* Volume Up */
  1336.   kHIDUsage_KeyboardVolumeDown  = 0x81, /* Volume Down */
  1337.   kHIDUsage_KeyboardLockingCapsLock = 0x82, /* Locking Caps Lock */
  1338.   kHIDUsage_KeyboardLockingNumLock = 0x83, /* Locking Num Lock */
  1339.   kHIDUsage_KeyboardLockingScrollLock = 0x84, /* Locking Scroll Lock */
  1340.   kHIDUsage_KeypadComma         = 0x85, /* Keypad Comma */
  1341.   kHIDUsage_KeypadEqualSignAS400 = 0x86, /* Keypad Equal Sign for AS/400 */
  1342.   kHIDUsage_KeyboardInternational1 = 0x87, /* International1 */
  1343.   kHIDUsage_KeyboardInternational2 = 0x88, /* International2 */
  1344.   kHIDUsage_KeyboardInternational3 = 0x89, /* International3 */
  1345.   kHIDUsage_KeyboardInternational4 = 0x8A, /* International4 */
  1346.   kHIDUsage_KeyboardInternational5 = 0x8B, /* International5 */
  1347.   kHIDUsage_KeyboardInternational6 = 0x8C, /* International6 */
  1348.   kHIDUsage_KeyboardInternational7 = 0x8D, /* International7 */
  1349.   kHIDUsage_KeyboardInternational8 = 0x8E, /* International8 */
  1350.   kHIDUsage_KeyboardInternational9 = 0x8F, /* International9 */
  1351.   kHIDUsage_KeyboardLANG1       = 0x90, /* LANG1 */
  1352.   kHIDUsage_KeyboardLANG2       = 0x91, /* LANG2 */
  1353.   kHIDUsage_KeyboardLANG3       = 0x92, /* LANG3 */
  1354.   kHIDUsage_KeyboardLANG4       = 0x93, /* LANG4 */
  1355.   kHIDUsage_KeyboardLANG5       = 0x94, /* LANG5 */
  1356.   kHIDUsage_KeyboardLANG6       = 0x95, /* LANG6 */
  1357.   kHIDUsage_KeyboardLANG7       = 0x96, /* LANG7 */
  1358.   kHIDUsage_KeyboardLANG8       = 0x97, /* LANG8 */
  1359.   kHIDUsage_KeyboardLANG9       = 0x98, /* LANG9 */
  1360.   kHIDUsage_KeyboardAlternateErase = 0x99, /* AlternateErase */
  1361.   kHIDUsage_KeyboardSysReqOrAttention = 0x9A, /* SysReq/Attention */
  1362.   kHIDUsage_KeyboardCancel      = 0x9B, /* Cancel */
  1363.   kHIDUsage_KeyboardClear       = 0x9C, /* Clear */
  1364.   kHIDUsage_KeyboardPrior       = 0x9D, /* Prior */
  1365.   kHIDUsage_KeyboardReturn      = 0x9E, /* Return */
  1366.   kHIDUsage_KeyboardSeparator   = 0x9F, /* Separator */
  1367.   kHIDUsage_KeyboardOut         = 0xA0, /* Out */
  1368.   kHIDUsage_KeyboardOper        = 0xA1, /* Oper */
  1369.   kHIDUsage_KeyboardClearOrAgain = 0xA2, /* Clear/Again */
  1370.   kHIDUsage_KeyboardCrSelOrProps = 0xA3, /* CrSel/Props */
  1371.   kHIDUsage_KeyboardExSel       = 0xA4, /* ExSel */
  1372.                                         /* 0xA5-0xDF Reserved */
  1373.   kHIDUsage_KeyboardLeftControl = 0xE0, /* Left Control */
  1374.   kHIDUsage_KeyboardLeftShift   = 0xE1, /* Left Shift */
  1375.   kHIDUsage_KeyboardLeftAlt     = 0xE2, /* Left Alt */
  1376.   kHIDUsage_KeyboardLeftGUI     = 0xE3, /* Left GUI */
  1377.   kHIDUsage_KeyboardRightControl = 0xE4, /* Right Control */
  1378.   kHIDUsage_KeyboardRightShift  = 0xE5, /* Right Shift */
  1379.   kHIDUsage_KeyboardRightAlt    = 0xE6, /* Right Alt */
  1380.   kHIDUsage_KeyboardRightGUI    = 0xE7, /* Right GUI */
  1381.                                         /* 0xE8-0xFFFF Reserved */
  1382.   kHIDUsage_Keyboard_Reserved   = 0xFFFF
  1383. };
  1384.  
  1385. /* LEDs Page (0x08) */
  1386. /* An LED or indicator is implemented as an On/Off Control (OOF) using the “Single button toggle” mode, 
  1387. |* where a value of 1 will turn on the indicator, and a value of 0 will turn it off. The exceptions are described below. */
  1388. enum {
  1389.   kHIDUsage_LED_NumLock         = 0x01, /* On/Off Control */
  1390.   kHIDUsage_LED_CapsLock        = 0x02, /* On/Off Control */
  1391.   kHIDUsage_LED_ScrollLock      = 0x03, /* On/Off Control */
  1392.   kHIDUsage_LED_Compose         = 0x04, /* On/Off Control */
  1393.   kHIDUsage_LED_Kana            = 0x05, /* On/Off Control */
  1394.   kHIDUsage_LED_Power           = 0x06, /* On/Off Control */
  1395.   kHIDUsage_LED_Shift           = 0x07, /* On/Off Control */
  1396.   kHIDUsage_LED_DoNotDisturb    = 0x08, /* On/Off Control */
  1397.   kHIDUsage_LED_Mute            = 0x09, /* On/Off Control */
  1398.   kHIDUsage_LED_ToneEnable      = 0x0A, /* On/Off Control */
  1399.   kHIDUsage_LED_HighCutFilter   = 0x0B, /* On/Off Control */
  1400.   kHIDUsage_LED_LowCutFilter    = 0x0C, /* On/Off Control */
  1401.   kHIDUsage_LED_EqualizerEnable = 0x0D, /* On/Off Control */
  1402.   kHIDUsage_LED_SoundFieldOn    = 0x0E, /* On/Off Control */
  1403.   kHIDUsage_LED_SurroundOn      = 0x0F, /* On/Off Control */
  1404.   kHIDUsage_LED_Repeat          = 0x10, /* On/Off Control */
  1405.   kHIDUsage_LED_Stereo          = 0x11, /* On/Off Control */
  1406.   kHIDUsage_LED_SamplingRateDetect = 0x12, /* On/Off Control */
  1407.   kHIDUsage_LED_Spinning        = 0x13, /* On/Off Control */
  1408.   kHIDUsage_LED_CAV             = 0x14, /* On/Off Control */
  1409.   kHIDUsage_LED_CLV             = 0x15, /* On/Off Control */
  1410.   kHIDUsage_LED_RecordingFormatDetect = 0x16, /* On/Off Control */
  1411.   kHIDUsage_LED_OffHook         = 0x17, /* On/Off Control */
  1412.   kHIDUsage_LED_Ring            = 0x18, /* On/Off Control */
  1413.   kHIDUsage_LED_MessageWaiting  = 0x19, /* On/Off Control */
  1414.   kHIDUsage_LED_DataMode        = 0x1A, /* On/Off Control */
  1415.   kHIDUsage_LED_BatteryOperation = 0x1B, /* On/Off Control */
  1416.   kHIDUsage_LED_BatteryOK       = 0x1C, /* On/Off Control */
  1417.   kHIDUsage_LED_BatteryLow      = 0x1D, /* On/Off Control */
  1418.   kHIDUsage_LED_Speaker         = 0x1E, /* On/Off Control */
  1419.   kHIDUsage_LED_HeadSet         = 0x1F, /* On/Off Control */
  1420.   kHIDUsage_LED_Hold            = 0x20, /* On/Off Control */
  1421.   kHIDUsage_LED_Microphone      = 0x21, /* On/Off Control */
  1422.   kHIDUsage_LED_Coverage        = 0x22, /* On/Off Control */
  1423.   kHIDUsage_LED_NightMode       = 0x23, /* On/Off Control */
  1424.   kHIDUsage_LED_SendCalls       = 0x24, /* On/Off Control */
  1425.   kHIDUsage_LED_CallPickup      = 0x25, /* On/Off Control */
  1426.   kHIDUsage_LED_Conference      = 0x26, /* On/Off Control */
  1427.   kHIDUsage_LED_StandBy         = 0x27, /* On/Off Control */
  1428.   kHIDUsage_LED_CameraOn        = 0x28, /* On/Off Control */
  1429.   kHIDUsage_LED_CameraOff       = 0x29, /* On/Off Control */
  1430.   kHIDUsage_LED_OnLine          = 0x2A, /* On/Off Control */
  1431.   kHIDUsage_LED_OffLine         = 0x2B, /* On/Off Control */
  1432.   kHIDUsage_LED_Busy            = 0x2C, /* On/Off Control */
  1433.   kHIDUsage_LED_Ready           = 0x2D, /* On/Off Control */
  1434.   kHIDUsage_LED_PaperOut        = 0x2E, /* On/Off Control */
  1435.   kHIDUsage_LED_PaperJam        = 0x2F, /* On/Off Control */
  1436.   kHIDUsage_LED_Remote          = 0x30, /* On/Off Control */
  1437.   kHIDUsage_LED_Forward         = 0x31, /* On/Off Control */
  1438.   kHIDUsage_LED_Reverse         = 0x32, /* On/Off Control */
  1439.   kHIDUsage_LED_Stop            = 0x33, /* On/Off Control */
  1440.   kHIDUsage_LED_Rewind          = 0x34, /* On/Off Control */
  1441.   kHIDUsage_LED_FastForward     = 0x35, /* On/Off Control */
  1442.   kHIDUsage_LED_Play            = 0x36, /* On/Off Control */
  1443.   kHIDUsage_LED_Pause           = 0x37, /* On/Off Control */
  1444.   kHIDUsage_LED_Record          = 0x38, /* On/Off Control */
  1445.   kHIDUsage_LED_Error           = 0x39, /* On/Off Control */
  1446.   kHIDUsage_LED_Usage           = 0x3A, /* Selector */
  1447.   kHIDUsage_LED_UsageInUseIndicator = 0x3B, /* Usage Switch */
  1448.   kHIDUsage_LED_UsageMultiModeIndicator = 0x3C, /* Usage Modifier */
  1449.   kHIDUsage_LED_IndicatorOn     = 0x3D, /* Selector */
  1450.   kHIDUsage_LED_IndicatorFlash  = 0x3E, /* Selector */
  1451.   kHIDUsage_LED_IndicatorSlowBlink = 0x3F, /* Selector */
  1452.   kHIDUsage_LED_IndicatorFastBlink = 0x40, /* Selector */
  1453.   kHIDUsage_LED_IndicatorOff    = 0x41, /* Selector */
  1454.   kHIDUsage_LED_FlashOnTime     = 0x42, /* Dynamic Value */
  1455.   kHIDUsage_LED_SlowBlinkOnTime = 0x43, /* Dynamic Value */
  1456.   kHIDUsage_LED_SlowBlinkOffTime = 0x44, /* Dynamic Value */
  1457.   kHIDUsage_LED_FastBlinkOnTime = 0x45, /* Dynamic Value */
  1458.   kHIDUsage_LED_FastBlinkOffTime = 0x46, /* Dynamic Value */
  1459.   kHIDUsage_LED_UsageIndicatorColor = 0x47, /* Usage Modifier */
  1460.   kHIDUsage_LED_IndicatorRed    = 0x48, /* Selector */
  1461.   kHIDUsage_LED_IndicatorGreen  = 0x49, /* Selector */
  1462.   kHIDUsage_LED_IndicatorAmber  = 0x4A, /* Selector */
  1463.   kHIDUsage_LED_GenericIndicator = 0x4B, /* On/Off Control */
  1464.   kHIDUsage_LED_SystemSuspend   = 0x4C, /* On/Off Control */
  1465.   kHIDUsage_LED_ExternalPowerConnected = 0x4D, /* On/Off Control */
  1466.                                         /* 0x4E - 0xFFFF Reserved */
  1467.   kHIDUsage_LED_Reserved        = 0xFFFF
  1468. };
  1469.  
  1470. /* Button Page (0x09) */
  1471. /* The Button page is the first place an application should look for user selection controls. System graphical user */
  1472. /* interfaces typically employ a pointer and a set of hierarchical selectors to select, move and otherwise manipulate */
  1473. /* their environment. For these purposes the following assignment of significance can be applied to the Button usages: */
  1474. /* • Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the 
  1475. |*   only button. Microsoft operating systems call this a logical left button, because it */
  1476. /*   is not necessarily physically located on the left of the pointing device. */
  1477. /* • Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems */
  1478. /*   to applications that typically assign application-specific functionality. */
  1479. /* • Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence */
  1480. /*   of two- and one-button devices. */
  1481. /* • Buttons 4 -55. As the button number increases, its significance as a selector decreases. */
  1482. /* In many ways the assignment of button numbers is similar to the assignment of Effort in Physical descriptors. */
  1483. /* Button 1 would be used to define the button a finger rests on when the hand is in the “at rest” position, that is, virtually */
  1484. /* no effort is required by the user to activate the button. Button values increment as the finger has to stretch to reach a */
  1485. /* control. See Section 6.2.3, “Physical Descriptors,” in the HID Specification for methods of further qualifying buttons. */
  1486. enum {
  1487.   kHIDUsage_Button_1            = 0x01, /* (primary/trigger) */
  1488.   kHIDUsage_Button_2            = 0x02, /* (secondary) */
  1489.   kHIDUsage_Button_3            = 0x03, /* (tertiary) */
  1490.   kHIDUsage_Button_4            = 0x04, /* 4th button */
  1491.                                         /* ... */
  1492.   kHIDUsage_Button_65535        = 0xFFFF
  1493. };
  1494.  
  1495. /* Ordinal Page (0x0A) */
  1496. /* The Ordinal page allows multiple instances of a control or sets of controls to be declared without requiring individual */
  1497. /* enumeration in the native usage page. For example, it is not necessary to declare usages of Pointer 1, Pointer 2, and so */
  1498. /* forth on the Generic Desktop page. When parsed, the ordinal instance number is, in essence, concatenated to the usages */
  1499. /* attached to the encompassing collection to create Pointer 1, Pointer 2, and so forth. */
  1500. /* For an example, see Section A.5, “Multiple Instances of a Control,” in Appendix A, “Usage Examples.” By convention, */
  1501. /* an Ordinal collection is placed inside the collection for which it is declaring multiple instances. */
  1502. /* Instances do not have to be identical. */
  1503. enum {
  1504.                                         /* 0x00 Reserved */
  1505.   kHIDUsage_Ord_Instance1       = 0x01, /* Usage Modifier */
  1506.   kHIDUsage_Ord_Instance2       = 0x02, /* Usage Modifier */
  1507.   kHIDUsage_Ord_Instance3       = 0x03, /* Usage Modifier */
  1508.   kHIDUsage_Ord_Instance4       = 0x04, /* Usage Modifier */
  1509.   kHIDUsage_Ord_Instance65535   = 0xFFFF /* Usage Modifier */
  1510. };
  1511.  
  1512. /* Telephony Page (0x0B) */
  1513. /* This usage page defines the keytop and control usages for telephony devices. */
  1514. /* Indicators on a phone are handled by wrapping them in LED: Usage In Use Indicator and LED: Usage Selected Indicator */
  1515. /* usages. For example, a message-indicator LED would be identified by a Telephony: Message usage declared as a Feature */
  1516. /* or Output in a LED: Usage In Use Indicator collection. */
  1517. /* See Section 14, “Consumer Page (0x0C),” for audio volume and tone controls. */
  1518. enum {
  1519.   kHIDUsage_Tfon_Phone          = 0x01, /* Application Collection */
  1520.   kHIDUsage_Tfon_AnsweringMachine = 0x02, /* Application Collection */
  1521.   kHIDUsage_Tfon_MessageControls = 0x03, /* Logical Collection */
  1522.   kHIDUsage_Tfon_Handset        = 0x04, /* Logical Collection */
  1523.   kHIDUsage_Tfon_Headset        = 0x05, /* Logical Collection */
  1524.   kHIDUsage_Tfon_TelephonyKeyPad = 0x06, /* Named Array */
  1525.   kHIDUsage_Tfon_ProgrammableButton = 0x07, /* Named Array */
  1526.                                         /* 0x08 - 0x1F Reserved */
  1527.   kHIDUsage_Tfon_HookSwitch     = 0x20, /* On/Off Control */
  1528.   kHIDUsage_Tfon_Flash          = 0x21, /* Momentary Control */
  1529.   kHIDUsage_Tfon_Feature        = 0x22, /* One-Shot Control */
  1530.   kHIDUsage_Tfon_Hold           = 0x23, /* On/Off Control */
  1531.   kHIDUsage_Tfon_Redial         = 0x24, /* One-Shot Control */
  1532.   kHIDUsage_Tfon_Transfer       = 0x25, /* One-Shot Control */
  1533.   kHIDUsage_Tfon_Drop           = 0x26, /* One-Shot Control */
  1534.   kHIDUsage_Tfon_Park           = 0x27, /* On/Off Control */
  1535.   kHIDUsage_Tfon_ForwardCalls   = 0x28, /* On/Off Control */
  1536.   kHIDUsage_Tfon_AlternateFunction = 0x29, /* Momentary Control */
  1537.   kHIDUsage_Tfon_Line           = 0x2A, /* One-Shot Control */
  1538.   kHIDUsage_Tfon_SpeakerPhone   = 0x2B, /* On/Off Control */
  1539.   kHIDUsage_Tfon_Conference     = 0x2C, /* On/Off Control */
  1540.   kHIDUsage_Tfon_RingEnable     = 0x2D, /* On/Off Control */
  1541.   kHIDUsage_Tfon_Ring           = 0x2E, /* Selector */
  1542.   kHIDUsage_Tfon_PhoneMute      = 0x2F, /* On/Off Control */
  1543.   kHIDUsage_Tfon_CallerID       = 0x30, /* Momentary Control */
  1544.                                         /* 0x31 - 0x4F Reserved */
  1545.   kHIDUsage_Tfon_SpeedDial      = 0x50, /* One-Shot Control */
  1546.   kHIDUsage_Tfon_StoreNumber    = 0x51, /* One-Shot Control */
  1547.   kHIDUsage_Tfon_RecallNumber   = 0x52, /* One-Shot Control */
  1548.   kHIDUsage_Tfon_PhoneDirectory = 0x53, /* On/Off Control */
  1549.                                         /* 0x54 - 0x6F Reserved */
  1550.   kHIDUsage_Tfon_VoiceMail      = 0x70, /* On/Off Control */
  1551.   kHIDUsage_Tfon_ScreenCalls    = 0x71, /* On/Off Control */
  1552.   kHIDUsage_Tfon_DoNotDisturb   = 0x72, /* On/Off Control */
  1553.   kHIDUsage_Tfon_Message        = 0x73, /* One-Shot Control */
  1554.   kHIDUsage_Tfon_AnswerOnOrOff  = 0x74, /* On/Off Control */
  1555.                                         /* 0x75 - 0x8F Reserved */
  1556.   kHIDUsage_Tfon_InsideDialTone = 0x90, /* Momentary Control */
  1557.   kHIDUsage_Tfon_OutsideDialTone = 0x91, /* Momentary Control */
  1558.   kHIDUsage_Tfon_InsideRingTone = 0x92, /* Momentary Control */
  1559.   kHIDUsage_Tfon_OutsideRingTone = 0x93, /* Momentary Control */
  1560.   kHIDUsage_Tfon_PriorityRingTone = 0x94, /* Momentary Control */
  1561.   kHIDUsage_Tfon_InsideRingback = 0x95, /* Momentary Control */
  1562.   kHIDUsage_Tfon_PriorityRingback = 0x96, /* Momentary Control */
  1563.   kHIDUsage_Tfon_LineBusyTone   = 0x97, /* Momentary Control */
  1564.   kHIDUsage_Tfon_ReorderTone    = 0x98, /* Momentary Control */
  1565.   kHIDUsage_Tfon_CallWaitingTone = 0x99, /* Momentary Control */
  1566.   kHIDUsage_Tfon_ConfirmationTone1 = 0x9A, /* Momentary Control */
  1567.   kHIDUsage_Tfon_ConfirmationTone2 = 0x9B, /* Momentary Control */
  1568.   kHIDUsage_Tfon_TonesOff       = 0x9C, /* On/Off Control */
  1569.   kHIDUsage_Tfon_OutsideRingback = 0x9D, /* Momentary Control */
  1570.                                         /* 0x9E - 0xAF Reserved */
  1571.   kHIDUsage_Tfon_PhoneKey0      = 0xB0, /* Selector/One-Shot Control */
  1572.   kHIDUsage_Tfon_PhoneKey1      = 0xB1, /* Selector/One-Shot Control */
  1573.   kHIDUsage_Tfon_PhoneKey2      = 0xB2, /* Selector/One-Shot Control */
  1574.   kHIDUsage_Tfon_PhoneKey3      = 0xB3, /* Selector/One-Shot Control */
  1575.   kHIDUsage_Tfon_PhoneKey4      = 0xB4, /* Selector/One-Shot Control */
  1576.   kHIDUsage_Tfon_PhoneKey5      = 0xB5, /* Selector/One-Shot Control */
  1577.   kHIDUsage_Tfon_PhoneKey6      = 0xB6, /* Selector/One-Shot Control */
  1578.   kHIDUsage_Tfon_PhoneKey7      = 0xB7, /* Selector/One-Shot Control */
  1579.   kHIDUsage_Tfon_PhoneKey8      = 0xB8, /* Selector/One-Shot Control */
  1580.   kHIDUsage_Tfon_PhoneKey9      = 0xB9, /* Selector/One-Shot Control */
  1581.   kHIDUsage_Tfon_PhoneKeyStar   = 0xBA, /* Selector/One-Shot Control */
  1582.   kHIDUsage_Tfon_PhoneKeyPound  = 0xBB, /* Selector/One-Shot Control */
  1583.   kHIDUsage_Tfon_PhoneKeyA      = 0xBC, /* Selector/One-Shot Control */
  1584.   kHIDUsage_Tfon_PhoneKeyB      = 0xBD, /* Selector/One-Shot Control */
  1585.   kHIDUsage_Tfon_PhoneKeyC      = 0xBE, /* Selector/One-Shot Control */
  1586.   kHIDUsage_Tfon_PhoneKeyD      = 0xBF, /* Selector/One-Shot Control */
  1587.                                         /* 0xC0 - 0xFFFF Reserved */
  1588.   kHIDUsage_TFon_Reserved       = 0xFFFF
  1589. };
  1590.  
  1591. /* Consumer Page (0x0C) */
  1592. /* All controls on the Consumer page are application-specific. That is, they affect a specific device, not the system as a whole. */
  1593. enum {
  1594.   kHIDUsage_Csmr_ConsumerControl = 0x01, /* Application Collection */
  1595.   kHIDUsage_Csmr_NumericKeyPad  = 0x02, /* Named Array */
  1596.   kHIDUsage_Csmr_ProgrammableButtons = 0x03, /* Named Array */
  1597.                                         /* 0x03 - 0x1F Reserved */
  1598.   kHIDUsage_Csmr_Plus10         = 0x20, /* One-Shot Control */
  1599.   kHIDUsage_Csmr_Plus100        = 0x21, /* One-Shot Control */
  1600.   kHIDUsage_Csmr_AMOrPM         = 0x22, /* One-Shot Control */
  1601.                                         /* 0x23 - 0x3F Reserved */
  1602.   kHIDUsage_Csmr_Power          = 0x30, /* On/Off Control */
  1603.   kHIDUsage_Csmr_Reset          = 0x31, /* One-Shot Control */
  1604.   kHIDUsage_Csmr_Sleep          = 0x32, /* One-Shot Control */
  1605.   kHIDUsage_Csmr_SleepAfter     = 0x33, /* One-Shot Control */
  1606.   kHIDUsage_Csmr_SleepMode      = 0x34, /* Re-Trigger Control */
  1607.   kHIDUsage_Csmr_Illumination   = 0x35, /* On/Off Control */
  1608.   kHIDUsage_Csmr_FunctionButtons = 0x36, /* Named Array */
  1609.                                         /* 0x37 - 0x3F Reserved */
  1610.   kHIDUsage_Csmr_Menu           = 0x40, /* On/Off Control */
  1611.   kHIDUsage_Csmr_MenuPick       = 0x41, /* One-Shot Control */
  1612.   kHIDUsage_Csmr_MenuUp         = 0x42, /* One-Shot Control */
  1613.   kHIDUsage_Csmr_MenuDown       = 0x43, /* One-Shot Control */
  1614.   kHIDUsage_Csmr_MenuLeft       = 0x44, /* One-Shot Control */
  1615.   kHIDUsage_Csmr_MenuRight      = 0x45, /* One-Shot Control */
  1616.   kHIDUsage_Csmr_MenuEscape     = 0x46, /* One-Shot Control */
  1617.   kHIDUsage_Csmr_MenuValueIncrease = 0x47, /* One-Shot Control */
  1618.   kHIDUsage_Csmr_MenuValueDecrease = 0x48, /* One-Shot Control */
  1619.                                         /* 0x49 - 0x5F Reserved */
  1620.   kHIDUsage_Csmr_DataOnScreen   = 0x60, /* On/Off Control */
  1621.   kHIDUsage_Csmr_ClosedCaption  = 0x61, /* On/Off Control */
  1622.   kHIDUsage_Csmr_ClosedCaptionSelect = 0x62, /* Selector */
  1623.   kHIDUsage_Csmr_VCROrTV        = 0x63, /* On/Off Control */
  1624.   kHIDUsage_Csmr_BroadcastMode  = 0x64, /* One-Shot Control */
  1625.   kHIDUsage_Csmr_Snapshot       = 0x65, /* One-Shot Control */
  1626.   kHIDUsage_Csmr_Still          = 0x66, /* One-Shot Control */
  1627.                                         /* 0x67 - 0x7F Reserved */
  1628.   kHIDUsage_Csmr_Selection      = 0x80, /* Named Array */
  1629.   kHIDUsage_Csmr_Assign         = 0x81, /* Selector */
  1630.   kHIDUsage_Csmr_ModeStep       = 0x82, /* One-Shot Control */
  1631.   kHIDUsage_Csmr_RecallLast     = 0x83, /* One-Shot Control */
  1632.   kHIDUsage_Csmr_EnterChannel   = 0x84, /* One-Shot Control */
  1633.   kHIDUsage_Csmr_OrderMovie     = 0x85, /* One-Shot Control */
  1634.   kHIDUsage_Csmr_Channel        = 0x86, /* Linear Control */
  1635.   kHIDUsage_Csmr_MediaSelection = 0x87, /* Selector */
  1636.   kHIDUsage_Csmr_MediaSelectComputer = 0x88, /* Selector */
  1637.   kHIDUsage_Csmr_MediaSelectTV  = 0x89, /* Selector */
  1638.   kHIDUsage_Csmr_MediaSelectWWW = 0x8A, /* Selector */
  1639.   kHIDUsage_Csmr_MediaSelectDVD = 0x8B, /* Selector */
  1640.   kHIDUsage_Csmr_MediaSelectTelephone = 0x8C, /* Selector */
  1641.   kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D, /* Selector */
  1642.   kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E, /* Selector */
  1643.   kHIDUsage_Csmr_MediaSelectGames = 0x8F, /* Selector */
  1644.   kHIDUsage_Csmr_MediaSelectMessages = 0x90, /* Selector */
  1645.   kHIDUsage_Csmr_MediaSelectCD  = 0x91, /* Selector */
  1646.   kHIDUsage_Csmr_MediaSelectVCR = 0x92, /* Selector */
  1647.   kHIDUsage_Csmr_MediaSelectTuner = 0x93, /* Selector */
  1648.   kHIDUsage_Csmr_Quit           = 0x94, /* One-Shot Control */
  1649.   kHIDUsage_Csmr_Help           = 0x95, /* On/Off Control */
  1650.   kHIDUsage_Csmr_MediaSelectTape = 0x96, /* Selector */
  1651.   kHIDUsage_Csmr_MediaSelectCable = 0x97, /* Selector */
  1652.   kHIDUsage_Csmr_MediaSelectSatellite = 0x98, /* Selector */
  1653.   kHIDUsage_Csmr_MediaSelectSecurity = 0x99, /* Selector */
  1654.   kHIDUsage_Csmr_MediaSelectHome = 0x9A, /* Selector */
  1655.   kHIDUsage_Csmr_MediaSelectCall = 0x9B, /* Selector */
  1656.   kHIDUsage_Csmr_ChannelIncrement = 0x9C, /* One-Shot Control */
  1657.   kHIDUsage_Csmr_ChannelDecrement = 0x9D, /* One-Shot Control */
  1658.   kHIDUsage_Csmr_Media          = 0x9E, /* Selector */
  1659.                                         /* 0x9F Reserved */
  1660.   kHIDUsage_Csmr_VCRPlus        = 0xA0, /* One-Shot Control */
  1661.   kHIDUsage_Csmr_Once           = 0xA1, /* One-Shot Control */
  1662.   kHIDUsage_Csmr_Daily          = 0xA2, /* One-Shot Control */
  1663.   kHIDUsage_Csmr_Weekly         = 0xA3, /* One-Shot Control */
  1664.   kHIDUsage_Csmr_Monthly        = 0xA4, /* One-Shot Control */
  1665.                                         /* 0xA5 - 0xAF Reserved */
  1666.   kHIDUsage_Csmr_Play           = 0xB0, /* On/Off Control */
  1667.   kHIDUsage_Csmr_Pause          = 0xB1, /* On/Off Control */
  1668.   kHIDUsage_Csmr_Record         = 0xB2, /* On/Off Control */
  1669.   kHIDUsage_Csmr_FastForward    = 0xB3, /* On/Off Control */
  1670.   kHIDUsage_Csmr_Rewind         = 0xB4, /* On/Off Control */
  1671.   kHIDUsage_Csmr_ScanNextTrack  = 0xB5, /* One-Shot Control */
  1672.   kHIDUsage_Csmr_ScanPreviousTrack = 0xB6, /* One-Shot Control */
  1673.   kHIDUsage_Csmr_Stop           = 0xB7, /* One-Shot Control */
  1674.   kHIDUsage_Csmr_Eject          = 0xB8, /* One-Shot Control */
  1675.   kHIDUsage_Csmr_RandomPlay     = 0xB9, /* On/Off Control */
  1676.   kHIDUsage_Csmr_SelectDisc     = 0xBA, /* Named Array */
  1677.   kHIDUsage_Csmr_EnterDisc      = 0xBB, /* Momentary Control */
  1678.   kHIDUsage_Csmr_Repeat         = 0xBC, /* One-Shot Control */
  1679.   kHIDUsage_Csmr_Tracking       = 0xBD, /* Linear Control */
  1680.   kHIDUsage_Csmr_TrackNormal    = 0xBE, /* One-Shot Control */
  1681.   kHIDUsage_Csmr_SlowTracking   = 0xBF, /* Linear Control */
  1682.   kHIDUsage_Csmr_FrameForward   = 0xC0, /* Re-Trigger Control */
  1683.   kHIDUsage_Csmr_FrameBack      = 0xC1, /* Re-Trigger Control */
  1684.   kHIDUsage_Csmr_Mark           = 0xC2, /* One-Shot Control */
  1685.   kHIDUsage_Csmr_ClearMark      = 0xC3, /* One-Shot Control */
  1686.   kHIDUsage_Csmr_RepeatFromMark = 0xC4, /* On/Off Control */
  1687.   kHIDUsage_Csmr_ReturnToMark   = 0xC5, /* One-Shot Control */
  1688.   kHIDUsage_Csmr_SearchMarkForward = 0xC6, /* One-Shot Control */
  1689.   kHIDUsage_Csmr_SearchMarkBackwards = 0xC7, /* One-Shot Control */
  1690.   kHIDUsage_Csmr_CounterReset   = 0xC8, /* One-Shot Control */
  1691.   kHIDUsage_Csmr_ShowCounter    = 0xC9, /* One-Shot Control */
  1692.   kHIDUsage_Csmr_TrackingIncrement = 0xCA, /* Re-Trigger Control */
  1693.   kHIDUsage_Csmr_TrackingDecrement = 0xCB, /* Re-Trigger Control */
  1694.   kHIDUsage_Csmr_StopOrEject    = 0xCC, /* One-Shot Control */
  1695.   kHIDUsage_Csmr_PlayOrPause    = 0xCD, /* One-Shot Control */
  1696.   kHIDUsage_Csmr_PlayOrSkip     = 0xCE, /* One-Shot Control */
  1697.                                         /* 0xCF - 0xDF Reserved */
  1698.   kHIDUsage_Csmr_Volume         = 0xE0, /* Linear Control */
  1699.   kHIDUsage_Csmr_Balance        = 0xE1, /* Linear Control */
  1700.   kHIDUsage_Csmr_Mute           = 0xE2, /* On/Off Control */
  1701.   kHIDUsage_Csmr_Bass           = 0xE3, /* Linear Control */
  1702.   kHIDUsage_Csmr_Treble         = 0xE4, /* Linear Control */
  1703.   kHIDUsage_Csmr_BassBoost      = 0xE5, /* On/Off Control */
  1704.   kHIDUsage_Csmr_SurroundMode   = 0xE6, /* One-Shot Control */
  1705.   kHIDUsage_Csmr_Loudness       = 0xE7, /* On/Off Control */
  1706.   kHIDUsage_Csmr_MPX            = 0xE8, /* On/Off Control */
  1707.   kHIDUsage_Csmr_VolumeIncrement = 0xE9, /* Re-Trigger Control */
  1708.   kHIDUsage_Csmr_VolumeDecrement = 0xEA, /* Re-Trigger Control */
  1709.                                         /* 0xEB - 0xEF Reserved */
  1710.   kHIDUsage_Csmr_Speed          = 0xF0, /* Selector */
  1711.   kHIDUsage_Csmr_PlaybackSpeed  = 0xF1, /* Named Array */
  1712.   kHIDUsage_Csmr_StandardPlay   = 0xF2, /* Selector */
  1713.   kHIDUsage_Csmr_LongPlay       = 0xF3, /* Selector */
  1714.   kHIDUsage_Csmr_ExtendedPlay   = 0xF4, /* Selector */
  1715.   kHIDUsage_Csmr_Slow           = 0xF5, /* One-Shot Control */
  1716.                                         /* 0xF6 - 0xFF Reserved */
  1717.   kHIDUsage_Csmr_FanEnable      = 0x0100, /* On/Off Control */
  1718.   kHIDUsage_Csmr_FanSpeed       = 0x0101, /* Linear Control */
  1719.   kHIDUsage_Csmr_LightEnable    = 0x0102, /* On/Off Control */
  1720.   kHIDUsage_Csmr_LightIlluminationLevel = 0x0103, /* Linear Control */
  1721.   kHIDUsage_Csmr_ClimateControlEnable = 0x0104, /* On/Off Control */
  1722.   kHIDUsage_Csmr_RoomTemperature = 0x0105, /* Linear Control */
  1723.   kHIDUsage_Csmr_SecurityEnable = 0x0106, /* On/Off Control */
  1724.   kHIDUsage_Csmr_FireAlarm      = 0x0107, /* One-Shot Control */
  1725.   kHIDUsage_Csmr_PoliceAlarm    = 0x0108, /* One-Shot Control */
  1726.                                         /* 0x109 - 0x14F Reserved */
  1727.   kHIDUsage_Csmr_BalanceRight   = 0x0150, /* Re-Trigger Control */
  1728.   kHIDUsage_Csmr_BalanceLeft    = 0x0151, /* Re-Trigger Control */
  1729.   kHIDUsage_Csmr_BassIncrement  = 0x0152, /* Re-Trigger Control */
  1730.   kHIDUsage_Csmr_BassDecrement  = 0x0153, /* Re-Trigger Control */
  1731.   kHIDUsage_Csmr_TrebleIncrement = 0x0154, /* Re-Trigger Control */
  1732.   kHIDUsage_Csmr_TrebleDecrement = 0x0155, /* Re-Trigger Control */
  1733.                                         /* 0x156 - 0x15F Reserved */
  1734.   kHIDUsage_Csmr_SpeakerSystem  = 0x0160, /* Logical Collection */
  1735.   kHIDUsage_Csmr_ChannelLeft    = 0x0161, /* Logical Collection */
  1736.   kHIDUsage_Csmr_ChannelRight   = 0x0162, /* Logical Collection */
  1737.   kHIDUsage_Csmr_ChannelCenter  = 0x0163, /* Logical Collection */
  1738.   kHIDUsage_Csmr_ChannelFront   = 0x0164, /* Logical Collection */
  1739.   kHIDUsage_Csmr_ChannelCenterFront = 0x0165, /* Logical Collection */
  1740.   kHIDUsage_Csmr_ChannelSide    = 0x0166, /* Logical Collection */
  1741.   kHIDUsage_Csmr_ChannelSurround = 0x0167, /* Logical Collection */
  1742.   kHIDUsage_Csmr_ChannelLowFrequencyEnhancement = 0x0168, /* Logical Collection */
  1743.   kHIDUsage_Csmr_ChannelTop     = 0x0169, /* Logical Collection */
  1744.   kHIDUsage_Csmr_ChannelUnknown = 0x016A, /* Logical Collection */
  1745.                                         /* 0x16B - 0x16F Reserved */
  1746.   kHIDUsage_Csmr_SubChannel     = 0x0170, /* Linear Control */
  1747.   kHIDUsage_Csmr_SubChannelIncrement = 0x0171, /* One-Shot Control */
  1748.   kHIDUsage_Csmr_SubChannelDecrement = 0x0172, /* One-Shot Control */
  1749.   kHIDUsage_Csmr_AlternateAudioIncrement = 0x0173, /* One-Shot Control */
  1750.   kHIDUsage_Csmr_AlternateAudioDecrement = 0x0174, /* One-Shot Control */
  1751.                                         /* 0x175 - 0x17F Reserved */
  1752.   kHIDUsage_Csmr_ApplicationLaunchButtons = 0x0180, /* Named Array */
  1753.   kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x0181, /* Selector */
  1754.   kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x0182, /* Selector */
  1755.   kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x0183, /* Selector */
  1756.   kHIDUsage_Csmr_ALWordProcessor = 0x0184, /* Selector */
  1757.   kHIDUsage_Csmr_ALTextEditor   = 0x0185, /* Selector */
  1758.   kHIDUsage_Csmr_ALSpreadsheet  = 0x0186, /* Selector */
  1759.   kHIDUsage_Csmr_ALGraphicsEditor = 0x0187, /* Selector */
  1760.   kHIDUsage_Csmr_ALPresentationApp = 0x0188, /* Selector */
  1761.   kHIDUsage_Csmr_ALDatabaseApp  = 0x0189, /* Selector */
  1762.   kHIDUsage_Csmr_ALEmailReader  = 0x018A, /* Selector */
  1763.   kHIDUsage_Csmr_ALNewsreader   = 0x018B, /* Selector */
  1764.   kHIDUsage_Csmr_ALVoicemail    = 0x018C, /* Selector */
  1765.   kHIDUsage_Csmr_ALContactsOrAddressBook = 0x018D, /* Selector */
  1766.   kHIDUsage_Csmr_ALCalendarOrSchedule = 0x018E, /* Selector */
  1767.   kHIDUsage_Csmr_ALTaskOrProjectManager = 0x018F, /* Selector */
  1768.   kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x0190, /* Selector */
  1769.   kHIDUsage_Csmr_ALCheckbookOrFinance = 0x0191, /* Selector */
  1770.   kHIDUsage_Csmr_ALCalculator   = 0x0192, /* Selector */
  1771.   kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x0193, /* Selector */
  1772.   kHIDUsage_Csmr_ALLocalMachineBrowser = 0x0194, /* Selector */
  1773.   kHIDUsage_Csmr_ALLANOrWANBrowser = 0x0195, /* Selector */
  1774.   kHIDUsage_Csmr_ALInternetBrowser = 0x0196, /* Selector */
  1775.   kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x0197, /* Selector */
  1776.   kHIDUsage_Csmr_ALNetworkConference = 0x0198, /* Selector */
  1777.   kHIDUsage_Csmr_ALNetworkChat  = 0x0199, /* Selector */
  1778.   kHIDUsage_Csmr_ALTelephonyOrDialer = 0x019A, /* Selector */
  1779.   kHIDUsage_Csmr_ALLogon        = 0x019B, /* Selector */
  1780.   kHIDUsage_Csmr_ALLogoff       = 0x019C, /* Selector */
  1781.   kHIDUsage_Csmr_ALLogonOrLogoff = 0x019D, /* Selector */
  1782.   kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x019E, /* Selector */
  1783.   kHIDUsage_Csmr_ALControlPanel = 0x019F, /* Selector */
  1784.   kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x01A0, /* Selector */
  1785.   kHIDUsage_Csmr_ALProcessOrTaskManager = 0x01A1, /* Selector */
  1786.   kHIDUsage_Csmr_AL             = 0x01A2, /* Selector */
  1787.   kHIDUsage_Csmr_ALNextTaskOrApplication = 0x0143, /* Selector */
  1788.   kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x01A4, /* Selector */
  1789.   kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x01A5, /* Selector */
  1790.                                         /* 0x1A6 - 0x1FF Reserved */
  1791.   kHIDUsage_Csmr_GenericGUIApplicationControls = 0x0200, /* Named Array */
  1792.   kHIDUsage_Csmr_ACNew          = 0x0201, /* Selector */
  1793.   kHIDUsage_Csmr_ACOpen         = 0x0202, /* Selector */
  1794.   kHIDUsage_Csmr_ACClose        = 0x0203, /* Selector */
  1795.   kHIDUsage_Csmr_ACExit         = 0x0204, /* Selector */
  1796.   kHIDUsage_Csmr_ACMaximize     = 0x0205, /* Selector */
  1797.   kHIDUsage_Csmr_ACMinimize     = 0x0206, /* Selector */
  1798.   kHIDUsage_Csmr_ACSave         = 0x0207, /* Selector */
  1799.   kHIDUsage_Csmr_ACPrint        = 0x0208, /* Selector */
  1800.   kHIDUsage_Csmr_ACProperties   = 0x0209, /* Selector */
  1801.   kHIDUsage_Csmr_ACUndo         = 0x021A, /* Selector */
  1802.   kHIDUsage_Csmr_ACCopy         = 0x021B, /* Selector */
  1803.   kHIDUsage_Csmr_ACCut          = 0x021C, /* Selector */
  1804.   kHIDUsage_Csmr_ACPaste        = 0x021D, /* Selector */
  1805.   kHIDUsage_Csmr_AC             = 0x021E, /* Selector */
  1806.   kHIDUsage_Csmr_ACFind         = 0x021F, /* Selector */
  1807.   kHIDUsage_Csmr_ACFindandReplace = 0x0220, /* Selector */
  1808.   kHIDUsage_Csmr_ACSearch       = 0x0221, /* Selector */
  1809.   kHIDUsage_Csmr_ACGoTo         = 0x0222, /* Selector */
  1810.   kHIDUsage_Csmr_ACHome         = 0x0223, /* Selector */
  1811.   kHIDUsage_Csmr_ACBack         = 0x0224, /* Selector */
  1812.   kHIDUsage_Csmr_ACForward      = 0x0225, /* Selector */
  1813.   kHIDUsage_Csmr_ACStop         = 0x0226, /* Selector */
  1814.   kHIDUsage_Csmr_ACRefresh      = 0x0227, /* Selector */
  1815.   kHIDUsage_Csmr_ACPreviousLink = 0x0228, /* Selector */
  1816.   kHIDUsage_Csmr_ACNextLink     = 0x0229, /* Selector */
  1817.   kHIDUsage_Csmr_ACBookmarks    = 0x022A, /* Selector */
  1818.   kHIDUsage_Csmr_ACHistory      = 0x022B, /* Selector */
  1819.   kHIDUsage_Csmr_ACSubscriptions = 0x022C, /* Selector */
  1820.   kHIDUsage_Csmr_ACZoomIn       = 0x022D, /* Selector */
  1821.   kHIDUsage_Csmr_ACZoomOut      = 0x022E, /* Selector */
  1822.   kHIDUsage_Csmr_ACZoom         = 0x022F, /* Selector */
  1823.   kHIDUsage_Csmr_ACFullScreenView = 0x0230, /* Selector */
  1824.   kHIDUsage_Csmr_ACNormalView   = 0x0231, /* Selector */
  1825.   kHIDUsage_Csmr_ACViewToggle   = 0x0232, /* Selector */
  1826.   kHIDUsage_Csmr_ACScrollUp     = 0x0233, /* Selector */
  1827.   kHIDUsage_Csmr_ACScrollDown   = 0x0234, /* Selector */
  1828.   kHIDUsage_Csmr_ACScroll       = 0x0235, /* Selector */
  1829.   kHIDUsage_Csmr_ACPanLeft      = 0x0236, /* Selector */
  1830.   kHIDUsage_Csmr_ACPanRight     = 0x0237, /* Selector */
  1831.   kHIDUsage_Csmr_ACPan          = 0x0238, /* Selector */
  1832.   kHIDUsage_Csmr_ACNewWindow    = 0x0239, /* Selector */
  1833.   kHIDUsage_Csmr_ACTileHorizontally = 0x023A, /* Selector */
  1834.   kHIDUsage_Csmr_ACTileVertically = 0x023B, /* Selector */
  1835.   kHIDUsage_Csmr_ACFormat       = 0x023C, /* Selector */
  1836.                                         /* 0x23D - 0xFFFF Reserved */
  1837.   kHIDUsage_Csmr_Reserved       = 0xFFFF
  1838. };
  1839.  
  1840. /* Digitizer Page (0x0D) */
  1841. /* This section provides detailed descriptions of the usages employed by Digitizer Devices. */
  1842. enum {
  1843.   kHIDUsage_Dig_Digitizer       = 0x01, /* Application Collection */
  1844.   kHIDUsage_Dig_Pen             = 0x02, /* Application Collection */
  1845.   kHIDUsage_Dig_LightPen        = 0x03, /* Application Collection */
  1846.   kHIDUsage_Dig_TouchScreen     = 0x04, /* Application Collection */
  1847.   kHIDUsage_Dig_TouchPad        = 0x05, /* Application Collection */
  1848.   kHIDUsage_Dig_WhiteBoard      = 0x06, /* Application Collection */
  1849.   kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07, /* Application Collection */
  1850.   kHIDUsage_Dig_3DDigitizer     = 0x08, /* Application Collection */
  1851.   kHIDUsage_Dig_StereoPlotter   = 0x09, /* Application Collection */
  1852.   kHIDUsage_Dig_ArticulatedArm  = 0x0A, /* Application Collection */
  1853.   kHIDUsage_Dig_Armature        = 0x0B, /* Application Collection */
  1854.   kHIDUsage_Dig_MultiplePointDigitizer = 0x0C, /* Application Collection */
  1855.   kHIDUsage_Dig_FreeSpaceWand   = 0x0D, /* Application Collection */
  1856.                                         /* 0x0E - 0x1F Reserved */
  1857.   kHIDUsage_Dig_Stylus          = 0x20, /* Logical Collection */
  1858.   kHIDUsage_Dig_Puck            = 0x21, /* Logical Collection */
  1859.   kHIDUsage_Dig_Finger          = 0x22, /* Logical Collection */
  1860.                                         /* 0x23 - 0x2F Reserved */
  1861.   kHIDUsage_Dig_TipPressure     = 0x30, /* Dynamic Value */
  1862.   kHIDUsage_Dig_BarrelPressure  = 0x31, /* Dynamic Value */
  1863.   kHIDUsage_Dig_InRange         = 0x32, /* Momentary Control */
  1864.   kHIDUsage_Dig_Touch           = 0x33, /* Momentary Control */
  1865.   kHIDUsage_Dig_Untouch         = 0x34, /* One-Shot Control */
  1866.   kHIDUsage_Dig_Tap             = 0x35, /* One-Shot Control */
  1867.   kHIDUsage_Dig_Quality         = 0x36, /* Dynamic Value */
  1868.   kHIDUsage_Dig_DataValid       = 0x37, /* Momentary Control */
  1869.   kHIDUsage_Dig_TransducerIndex = 0x38, /* Dynamic Value */
  1870.   kHIDUsage_Dig_TabletFunctionKeys = 0x39, /* Logical Collection */
  1871.   kHIDUsage_Dig_ProgramChangeKeys = 0x3A, /* Logical Collection */
  1872.   kHIDUsage_Dig_BatteryStrength = 0x3B, /* Dynamic Value */
  1873.   kHIDUsage_Dig_Invert          = 0x3C, /* Momentary Control */
  1874.   kHIDUsage_Dig_XTilt           = 0x3D, /* Dynamic Value */
  1875.   kHIDUsage_Dig_YTilt           = 0x3E, /* Dynamic Value */
  1876.   kHIDUsage_Dig_Azimuth         = 0x3F, /* Dynamic Value */
  1877.   kHIDUsage_Dig_Altitude        = 0x40, /* Dynamic Value */
  1878.   kHIDUsage_Dig_Twist           = 0x41, /* Dynamic Value */
  1879.   kHIDUsage_Dig_TipSwitch       = 0x42, /* Momentary Control */
  1880.   kHIDUsage_Dig_SecondaryTipSwitch = 0x43, /* Momentary Control */
  1881.   kHIDUsage_Dig_BarrelSwitch    = 0x44, /* Momentary Control */
  1882.   kHIDUsage_Dig_Eraser          = 0x45, /* Momentary Control */
  1883.   kHIDUsage_Dig_TabletPick      = 0x46, /* Momentary Control */
  1884.                                         /* 0x47 - 0xFFFF Reserved */
  1885.   kHIDUsage_Dig_Reserved        = 0xFFFF
  1886. };
  1887.  
  1888. /* AlphanumericDisplay Page (0x14) */
  1889. /* The Alphanumeric Display page is intended for use by simple alphanumeric displays that are used on consumer devices. */
  1890. enum {
  1891.   kHIDUsage_AD_AlphanumericDisplay = 0x01, /* Application Collection */
  1892.                                         /* 0x02 - 0x1F Reserved */
  1893.   kHIDUsage_AD_DisplayAttributesReport = 0x20, /* Logical Collection */
  1894.   kHIDUsage_AD_ASCIICharacterSet = 0x21, /* Static Flag */
  1895.   kHIDUsage_AD_DataReadBack     = 0x22, /* Static Flag */
  1896.   kHIDUsage_AD_FontReadBack     = 0x23, /* Static Flag */
  1897.   kHIDUsage_AD_DisplayControlReport = 0x24, /* Logical Collection */
  1898.   kHIDUsage_AD_ClearDisplay     = 0x25, /* Dynamic Flag */
  1899.   kHIDUsage_AD_DisplayEnable    = 0x26, /* Dynamic Flag */
  1900.   kHIDUsage_AD_ScreenSaverDelay = 0x27, /* Static Value */
  1901.   kHIDUsage_AD_ScreenSaverEnable = 0x28, /* Dynamic Flag */
  1902.   kHIDUsage_AD_VerticalScroll   = 0x29, /* Static Flag */
  1903.   kHIDUsage_AD_HorizontalScroll = 0x2A, /* Static Flag */
  1904.   kHIDUsage_AD_CharacterReport  = 0x2B, /* Logical Collection */
  1905.   kHIDUsage_AD_DisplayData      = 0x2C, /* Dynamic Value */
  1906.   kHIDUsage_AD_DisplayStatus    = 0x2D, /* Logical Collection */
  1907.   kHIDUsage_AD_StatNotReady     = 0x2E, /* Selector */
  1908.   kHIDUsage_AD_StatReady        = 0x2F, /* Selector */
  1909.   kHIDUsage_AD_ErrNotaloadablecharacter = 0x30, /* Selector */
  1910.   kHIDUsage_AD_ErrFontdatacannotberead = 0x31, /* Selector */
  1911.   kHIDUsage_AD_CursorPositionReport = 0x32, /* Logical Collection */
  1912.   kHIDUsage_AD_Row              = 0x33, /* Dynamic Value */
  1913.   kHIDUsage_AD_Column           = 0x34, /* Dynamic Value */
  1914.   kHIDUsage_AD_Rows             = 0x35, /* Static Value */
  1915.   kHIDUsage_AD_Columns          = 0x36, /* Static Value */
  1916.   kHIDUsage_AD_CursorPixelPositioning = 0x37, /* Static Flag */
  1917.   kHIDUsage_AD_CursorMode       = 0x38, /* Dynamic Flag */
  1918.   kHIDUsage_AD_CursorEnable     = 0x39, /* Dynamic Flag */
  1919.   kHIDUsage_AD_CursorBlink      = 0x3A, /* Dynamic Flag */
  1920.   kHIDUsage_AD_FontReport       = 0x3B, /* Logical Collection */
  1921.   kHIDUsage_AD_FontData         = 0x3C, /* Buffered Byte */
  1922.   kHIDUsage_AD_CharacterWidth   = 0x3D, /* Static Value */
  1923.   kHIDUsage_AD_CharacterHeight  = 0x3E, /* Static Value */
  1924.   kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F, /* Static Value */
  1925.   kHIDUsage_AD_CharacterSpacingVertical = 0x40, /* Static Value */
  1926.   kHIDUsage_AD_UnicodeCharacterSet = 0x41, /* Static Flag */
  1927.                                         /* 0x42 - 0xFFFF Reserved */
  1928.   kHIDUsage_AD_Reserved         = 0xFFFF
  1929. };
  1930.  
  1931.  
  1932. #if PRAGMA_STRUCT_ALIGN
  1933.     #pragma options align=reset
  1934. #elif PRAGMA_STRUCT_PACKPUSH
  1935.     #pragma pack(pop)
  1936. #elif PRAGMA_STRUCT_PACK
  1937.     #pragma pack()
  1938. #endif
  1939.  
  1940. #ifdef PRAGMA_IMPORT_OFF
  1941. #pragma import off
  1942. #elif PRAGMA_IMPORT
  1943. #pragma import reset
  1944. #endif
  1945.  
  1946. #ifdef __cplusplus
  1947. }
  1948. #endif
  1949.  
  1950. #endif /* __HID__ */
  1951.  
  1952.